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

React Navigation support useEffect Hook? Error callback is not a function #5851

Closed
cassubianApp opened this issue Apr 25, 2019 · 4 comments
Closed

Comments

@cassubianApp
Copy link

cassubianApp commented Apr 25, 2019

I have a problem with the useEffect hook in React Native. When I next navigate to the component with useEffect I get following error : callback is not a function.

https://github.com/cassubianApp/react-navigation-test

it looks like the hook is calling, but right after that it gets a bug. Could this be a problem with my configuration or if React Navigation does not support hooks

react-navigation 3.9
react-native 0.59

@jeveloper
Copy link

did you get it figured out? feel free to share

@sedenardi
Copy link

sedenardi commented May 7, 2019

Also seeing this issue with navigating to components that implement useEffect.

callback is not a function. (In 'callback()', 'callback' is 3)

flushFirstCallback
    scheduler.development.js:107:35
flushWork
    scheduler.development.js:219:28
_flushCallback
    scheduler.development.js:522:18
_callTimer
    JSTimers.js:152:14
callTimers
    JSTimers.js:414:17
__callFunction
    MessageQueue.js:366:47
<unknown>
    MessageQueue.js:106:26
__guard
    MessageQueue.js:314:10
callFunctionReturnFlushedQueue
    MessageQueue.js:105:17
callFunctionReturnFlushedQueue
    [native code]:0

@cassubianApp why did you close the issue?

@rafgoncalves
Copy link

I'm getting the same behaviour here. It doesn't matter what's the effect even useEffect(() => null, []) crashes

@ryleyrandall22
Copy link

Getting the same issue. Has anyone figured out a solution?

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

5 participants