Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump react-navigation #4216

Merged
merged 4 commits into from
May 29, 2024
Merged

Bump react-navigation #4216

merged 4 commits into from
May 29, 2024

Conversation

haileyok
Copy link
Contributor

This is a simple upgrade for React Navigation. There is one change that I had to make for types in our getCurrentRoute() function, which is supposed to return whatever the current route's name is.

Right now we have state parameter as non-optional - and the old react-navigation types allowed for this. However, in reality - particularly on web - it is in fact possible for state to be undefined, and it seems that the latest react-navigation has fixed this type problem.

The current behavior that we use is to assume that Home is the route we are on if name is undefined. This makes sense, since if you were to somehow land on a page that has no navigation state and we wanted to "send you back to a working page", that page would be Home.

I want to read a little more though in our code to see if this is a perfect assumption, there might be some case where it doesn't work.

Copy link

render bot commented May 24, 2024

Copy link

Old size New size Diff
7.31 MB 7.31 MB 4 B (0.00%)

@gaearon gaearon merged commit 8f8af47 into main May 29, 2024
5 of 6 checks passed
@gaearon gaearon deleted the hailey/upgrade-react-navigation branch May 29, 2024 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants