When the app first bootstraps it shows a console log. But when re-adjusting the screen size the currentBreakpoint value does not update in App.tsx. It works fine in lower components. But I think this makes sense because we are using useCurrentBreakpoint before we declare the StacksProvider.
Any idea on how to get around this? One solution is to make a Navigation child component where we can handle that logic in there instead of at the root of the application, but it would be nice to have this logic where we define the navigation stack as well. Thoughts?
Im wondering if it is possible to show/hide certain components based on the current break point from the root of the application. Example:
App.tsx
When the app first bootstraps it shows a console log. But when re-adjusting the screen size the
currentBreakpoint
value does not update in App.tsx. It works fine in lower components. But I think this makes sense because we are usinguseCurrentBreakpoint
before we declare theStacksProvider
.Any idea on how to get around this? One solution is to make a Navigation child component where we can handle that logic in there instead of at the root of the application, but it would be nice to have this logic where we define the navigation stack as well. Thoughts?