- React
- ReactiveConf
- 2018
- Convenient Data Fetching with Higher Order Components
Convenient Data Fetching with Higher Order Components
Martin Pinter at ReactiveConf 2018
While the React community has largely agreed on abstracting complex app state away from the components, it is often a different story when it comes to remote data-fetching. On one side stand the many incarnations of the "fetch on didMount, show placeholder while isLoading" pattern, on the other you have frameworks like Apollo and Falcor - great in their own right, but what if we can't (or even don't want to) use them on a particular project ? We'll be showing a small and self-contained data provider library - using higher-order React components and Redux on client side, and requiring zero changes to you backend. We'll also keep our components from worrying about how and when the fetching happens - defining instead only what data is required, while abstracting all of the race-conditions and caching via a single HOC, handling the hard parts.