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
There's a useNavigationPanel hook in the hook folder of the example project. I was trying to get deep in how to use the react-native-pager-view and I saw this useMemo as the initializer of useState.
Is it a mistake? What kind of syntax is it and what is the reason?
As far as I know, the useState initializer executes just once before the first render and will not execute again unless the component remounts.
So if it's on purpose, then please explain it. Otherwise, I can create a PR and change it to a normal useState
The text was updated successfully, but these errors were encountered:
Ask your Question
There's a
useNavigationPanel
hook in the hook folder of the example project. I was trying to get deep in how to use the react-native-pager-view and I saw this useMemo as the initializer of useState.Is it a mistake? What kind of syntax is it and what is the reason?
As far as I know, the
useState
initializer executes just once before the first render and will not execute again unless the component remounts.So if it's on purpose, then please explain it. Otherwise, I can create a PR and change it to a normal
useState
The text was updated successfully, but these errors were encountered: