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

Warning: Non-serializable values were found in the navigation #304

Open
ghorbani-m opened this issue Sep 23, 2022 · 0 comments
Open

Warning: Non-serializable values were found in the navigation #304

ghorbani-m opened this issue Sep 23, 2022 · 0 comments

Comments

@ghorbani-m
Copy link
Collaborator

ghorbani-m commented Sep 23, 2022

In the ImageGalleryViewer screen, we need the main RCL list to scroll in the background while exploring the images.
For this purpose, we passed the RCL reference to this screen through navigation params and it is not a good idea and get a warning from react-navigation.
ImageGalleryViewer > params.scrollToItem (Function)

This can break usage such as persisting and restoring state. This might happen if you passed non-serializable values such as function, class instances etc. in params. If you need to use components with callbacks in your options, you can use 'navigation.setOptions' instead. See https://reactnavigation.org/docs/troubleshooting#i-get-the-warning-non-serializable-values-were-found-in-the-navigation-state for more details.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

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

No branches or pull requests

1 participant