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

useReferesh example is not valid. Why do we even need it in this case which is shown in the example. #62

Open
yadavseetaram opened this issue Dec 17, 2021 · 0 comments

Comments

@yadavseetaram
Copy link

yadavseetaram commented Dec 17, 2021

Here is the sandbox example of mine where I have achieved the same without using either useReferesh and useEffect.

https://codesandbox.io/s/affectionate-carlos-bc2qe?file=/src/App.js

It will work because whenever we change any sate using useState in function component or this.setState in-class component react update rerender the component automatically.
Screenshot 2021-12-17 at 11 41 51 AM

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