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

Renderer Error on close if HeaderComponent uses redux selector #475

Open
Frieder-AirLST opened this issue Feb 1, 2023 · 0 comments
Open

Comments

@Frieder-AirLST
Copy link

Frieder-AirLST commented Feb 1, 2023

Describe the bug
The renderer crashes on the end of the scroll down animation ( debounce ) if I use a custom HeaderComponent with a redux-toolkit enabled selector in it.

Reproduce
Snack Demo
sadly it does not work in the browser but you can run it locally.
if you in and outcomment line 6/7 in the compoinents/Header.js File you can see that it works or throws an error based on if the store is used or not.

Dependencies:

  • "@react-navigation/native": "^6.1.1",
  • "@react-navigation/native-stack": "^6.9.7",
  • "react-native-gesture-handler": "~2.8.0",
  • "react-native-modalize": "^2.1.1",
  • "react": "18.1.0",
  • "react-native": "0.70.5",

I would guess that the Header component is not reactive, so it is only loaded once and does not update... ?

Update: I tried it with other selectors. The moment useSelector() is used in the Header component, the error ocures. the result of the selector does not need to be used.

demo

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