Custom navigation with Navigator component in React-Native

后端 未结 4 2071
小鲜肉
小鲜肉 2021-01-29 17:46

I’m exploring possibilities of React Native while developing a demo app with custom navigation between views with the help of Navigator component.

The main app class ren

4条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-29 18:34

    Your approach should work great. In big apps at Fb, we avoid calling the require() for the scene component until we render it, which can save a bit of start-up time.

    The renderScene function should be called when the scene is first pushed to the Navigator. It will also be called for the active scene when the Navigator gets re-rendered. If you see renderScene get called multiple times after a push, then it is probably a bug.

    The navigator is still a work in progress, but if you find any problems with it please file on github and tag me! (@ericvicenti)

提交回复
热议问题