Files
react-native-paper/example
Julian Hundeloh 63349a727d fix: ref set to null on updates (#410)
### 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.
2018-06-06 13:10:33 +02:00
..
2018-05-06 18:33:30 +02:00
2018-06-04 15:46:45 +02:00
2017-11-27 01:29:42 +05:30
2018-05-31 07:44:55 +02:00
2018-05-31 07:44:55 +02:00
2017-07-19 04:11:22 +05:30

Run the example

  • View it with Expo
  • Run the example locally
    • Clone the repository and cd to this directory
    • Run yarn to install the dependencies
    • Run yarn start to start the packager
    • Scan the QR Code with the Expo app