mirror of
https://github.com/zhigang1992/react-native-paper.git
synced 2026-06-11 00:08:51 +08:00
### Motivation The ref function is called twice on updates (see https://reactjs.org/docs/refs-and-the-dom.html#caveats-with-callback-refs). This behaviour causes the variable `this._manager` sometimes to be null during rendering and in that case actions are pushed to the queue again. Since the queue is only processed once (during componentDidMount), somes changes will never be visible. The simple solution is to bind the ref-function as mentioned in the link above. ### Test plan Dynamically change `visible` parameter of Modal. The Modal won't be visible on the second time.
Run the example
- View it with Expo
- Run the example locally
- Clone the repository and
cdto this directory - Run
yarnto install the dependencies - Run
yarn startto start the packager - Scan the QR Code with the Expo app
- Clone the repository and