my application using navigatorios. whenever new scene push stack, didn't release memory. seems intuitive, cause allowing pop previous route. tried use replace instead of push, however, title won't change.
is there workaround on case? requiremnent: change title on every route
edit:
in application, there several sections , each section has different navigator title.
<navigatorios ref='nav' initialroute={{ component: component, title: title, }} />
to change title, use push show next section. memory meter in xcode showing it's using more , more.
this.refs.nav.push({ component: component, title: title, });
answer
finally changed use navigator instead of navigatorios. using replace instead of push.
can show code here can diagnose problem thoroughly?
anyhow, changing title on every route easy navigator, in root navigator component, define routes.
const routes = { movies, contact };
create custom component inside renderscene method
renderscene(route, navigator) { let component = routes[route.name]; return <component navigator={navigator} {...route.passprops}/> }
as can see renderscene method passes props , place pass title next screen.
hope helps!
Comments
Post a Comment