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

Bug: help #32658

Open
decadezzz opened this issue Mar 18, 2025 · 1 comment
Open

Bug: help #32658

decadezzz opened this issue Mar 18, 2025 · 1 comment
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@decadezzz
Copy link

React version: 18.2.0

Steps To Reproduce

If I dipatch a AsyncThunk in useEffect ,can I use the latest state in the useEffect function immediately ?

Link to code example:

const user = useAppSelector((store) => store.user,shallowEqual);
useEffect(() => {
()=>{
dispatch(load()).then(() => {
console.log(user);}
}, []);

@decadezzz decadezzz added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Mar 18, 2025
@crwg
Copy link

crwg commented Mar 22, 2025

project is dead, just forget :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug
Projects
None yet
Development

No branches or pull requests

2 participants