Skip to content

Instantly share code, notes, and snippets.

@kod3r
kod3r / webS
Created October 6, 2019 01:44 — forked from zacjszewczyk/webS
A syllable dictionary I built with Python. See https://zacs.site/blog/building-a-syllable-dictionary-with-python.html for the full writeup.
This file has been truncated, but you can view the full file.
# A syllable dictionary I built with Python. See https://zacs.site/blog/building-a-syllable-dictionary-with-python.html for the full writeup.
#
# This work is licensed under a Creative Commons Attribution 4.0 International License
# See https://zacs.site/disclaimers.html for more information.
# © 2012-2019 Zachary Szewczyk.
a,1
a,1
aa,1
aal,-1
@elierotenberg
elierotenberg / BLOG.md
Last active January 27, 2025 17:28
Idiomatic Data Fetching using React Hooks

Idiomatic Data Fetching using React Hooks

This post has been written in collaboration with @klervicn

Virtually all web apps and websites need to pull data from a server, usually through a JSON-returning API. When it comes to integrating data fetching in React component, the "impedence mismatch" between the React components, which are declarative and synchronous, and the HTTP requests, which are imperative and asynchronous, is often problematic.

Many apps use third-party libraries such as Redux or Apollo Client to abstract it away. This requires extra dependencies, and couple your app with a specific library to perform data fetching. In most cases, what we want is a direct way to integrate plain HTTP requests (e.g. using native fetch) for usage in React components.

Here we will discuss how we can use React Hooks to do this in an elegant, scalable manner.