DEV Community

Sean Brunnock
Sean Brunnock

Posted on • Updated on

4 examples of fetching with React and useEffect

Here are 4 simple examples of React using the useEffect hook and the Fetch API- getting plain text; getting JSON; posting JSON; and handling errors. All four examples are running live code, so you can play around with it and hopefully get a feel for it. At least it worked for me.

https://sean.brunnock.com/React/Examples/ReactFetchDemos/

Top comments (0)