Below is a code snippet taken from the react-navigation
documentation on how to pass data to a previous screen.
React.useEffect(() => { if (route.params?.post) { // Post updated, do something with `route.params.post` // For example, send the post to the server console.log(route.params.post); } }, [route.params?.post]);
Everything works fine however I am getting the following error.
Property 'post' does not exist on type 'object'.
How do I remove this error ?