DEV Community

Cover image for React architecture series, Render props, Hooks and Context API
Chris Noring
Chris Noring

Posted on • Edited on

React architecture series, Render props, Hooks and Context API

Trying to learn React?

There are some patterns you should know about that will make it easier to organize your code.

  • Render props, this pattern gives you a great way to organize your code in Provider, Consumer way. This article shows how you can create component for fetching data so all you need to think about is creating presentation components and how the data should be rendered. This and more examples inside of the article.
  • Hooks, Hooks is this new paradigm. In short it allows for creating state in functional components, which is a massive change. Most of all it is a very different way of thinking about component creation as you will see throughout the article
  • Context API, ever wondered how you can broadcast a change to all components, i.e do Pub-Sub? That's what the Context API offers. Maybe you don't need a full Redux implementation. Maybe the Context API is enough?

Top comments (3)

Collapse
 
snipter profile image
Jaroslav Khorishchenko

The links are not working anymore :(

Collapse
 
softchris profile image
Chris Noring

hi Jaroslav, apologies for that. Links are now updated and should work.

Collapse
 
snipter profile image
Jaroslav Khorishchenko

Didn't expect such a fast reaction, thanks!