Skip to content

UseEffect is not called on app relaunch (Initial render) #1477

Open
@shubhamchhipa-jfl

Description

@shubhamchhipa-jfl

I am getting a very strange issue with my code that when i try to launch my app useEffects are not called because we are using redux-persist. This was working till we had the react native version 0.70.x but when we upgraded this to 0.75.x we are getting this behaviour because of the redux states we are persisting. when we try to launch the app after killing it it compares the state and doesn't trigger useEffect as the state is same but we want to call it when app first time launches and it should be called on initial render. This was working fine till RN version 0.70.x. Can anyone please help in this case.

"react": "18.3.1",
"react-dom": "^18.3.1",
"react-native": "0.75.3",
"react-redux": "8.0.1",
"redux": "^4.2.0",
"redux-logger": "^3.0.6",
"redux-persist": "^6.0.0",
"redux-persist-sensitive-storage": "^1.0.0",
"redux-saga": "^1.2.1"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions