petehunt / react-howto

Your guide to the (sometimes overwhelming!) React ecosystem.
11.61k stars 772 forks source link

Loading remote data #8

Open ryanbrainard opened 8 years ago

ryanbrainard commented 8 years ago

Love the guide. Wish I had this when I was getting started.

I would suggest adding something about different options for loading data from the server. I have found that a lot of guides punt on this because React and most of libraries in the ecosystem are a client-side technologies so loading remote data is (kind of) out of scope, but then it is the one of the first challenges people run into when building real world applications. I find that people either end up doing AJAX directly in the component as suggested in Load Initial Data via AJAX, which works on a small scale, but doesn't really scale and can start to get messy, or they end up diving into the deep end with Flux and try doing data loading there, which multiplies the challenges for a beginner. Even the first response to your tweet hit on this as well.

At the risk of tooting my own horn, I ran into a lot of these same problem myself and ended up releasing React Refetch as an alternative. A lot of people have found it helpful for applications just need to load data without diving head first into Flux, and I think it could be helpful for beginners. Of course this is not the only way to do it, and I'd like to see your guide mention a few different alternatives for dealing with remote data.

joelataylor commented 8 years ago

+1

jaredpalmer commented 8 years ago

+1

jbthummar commented 8 years ago

+1

gugahoi commented 8 years ago

+1

alexhawkins commented 8 years ago

+1

jerrylau91 commented 8 years ago

+1

seripap commented 8 years ago

+1

rishipuri commented 8 years ago

+1

morganlegal commented 8 years ago

+1