React-native-router-flux: Memory leak and there are alot of setState warning when rotate screen after calling screen transition

Created on 11 May 2016  路  10Comments  路  Source: aksonov/react-native-router-flux

I'm using:

  • react-native-router-flux v3.2.8
  • react-native v0.22.0

Expected behaviour

App work fine when rotate screen many times

Actual behaviour

Memory leak issue after 10-20 times rotate screen and there are alot of setState warning:
image

Steps to reproduce

  1. Download React-native-router-flux, open and run Example in XCode
  2. Click "Go to login page", click "Back" to "Home"
  3. Rotate screen about 10 times
  4. Got the above error

    More infor:

I tried sample Navigation from React Navative's UIExplorer, don't have this issue
image

Thanks

All 10 comments

Have you tried adding
shouldComponentUpdate(){
return false
}
??

Good suggest :-), why don't you tell me use static html instead of React

@tinygipxy I suggest you to try experimental 0.26-wip branch with react native 0.26.0-rc. Looks like it is RN issue, not this component.

@tinygipxy That's what you say to someone who is trying to help you out?

@bosung90 Nothing serious here, thank you anyway
@aksonov I tried to use this component (3.22.23) with react-native 0.26.0-rc, but got issue "Super expression must either be null or a function, not undefined" that caused by :
import {Scene} from 'react-native-router-flux' command

@tinygipxy You also need to use the 0.26-wip branch..

@cridenour Can you help to explain it more ? what is 0.26-wip and where can I get it ?

It's a branch on this project.

In your package.json, update this library to read
"react-native-router-flux": "aksonov/react-native-router-flux#0.26-wip",

Then run npm install again.

Yes, branch 0.26-wip with react 0.26.0-rc don't have this issue

I'll close this issue since it's resolved by 0.26.

Thank you @tinygipxy.

Was this page helpful?
0 / 5 - 0 ratings