You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Action.Push need onPop props to trigger some state change #896
Not sure if the push action is the right place to add such functionality. Maybe it should be rather something of the useNavigation hook. The hook could provide some callback that is triggered as soon as the the component is rendered again.
Not exactly sure about your use case, but you could add some callback to the component that you push. The callback can then update the previous screen. As far as I understand, this should solve your problem.
This workaround doesn't work.
I've a Websocket on the main command screen updating a state passed on a pushed screen (data are stored with a useState hook).
The state is passed to the second screen via a prop.
Activity
thomaspaulmann commentedon Feb 23, 2022
Not sure if the push action is the right place to add such functionality. Maybe it should be rather something of the
useNavigationhook. The hook could provide some callback that is triggered as soon as the the component is rendered again.Not exactly sure about your use case, but you could add some callback to the component that you push. The callback can then update the previous screen. As far as I understand, this should solve your problem.
thomaspaulmann commentedon Apr 20, 2022
I'm closing this issue given that there is a workaround for it.
MarlBurroW commentedon Oct 12, 2023
This workaround doesn't work.
I've a Websocket on the main command screen updating a state passed on a pushed screen (data are stored with a useState hook).
The state is passed to the second screen via a prop.
Example
When the websocket update data on the main screen, this update doesn't trigger re-rendering on the pushed screen.
Add tembo extension (#21366)
Update Teak: palette colors, faster start and fixes (#33009)