Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to rerender a page in React when the user clicks the back button

We had a similar desire and solved it by passing a refresh function from the parent to the child.

for example, when you open the child, you would have something like navigate('Child', { refresh: refreshFunction }

You can then access this function in the child ( via something like this.props.navigation.state.params.refresh(); ) before the back action.
 
PREVIOUS NEXT
Tagged: #rerender #page #React #user #clicks #button
ADD COMMENT
Topic
Name
6+9 =