Rapid Prototyping with React PowerPlug

Share this video with your friends

Send Tweet

React PowerPlug is a set of pluggable renderless components to help you prototype quickly. These components don't actually render DOM to the page but contain the state and logic for you to power your presentation components via render props. In this lesson we'll look at the <State> component and re-create the traditional counter example to see the potential of React PowerPlug.

Haroen Viaene
Haroen Viaene
~ 3 years ago

In the new setState calls, shouldn't we use the function form so nothing can go wrong with batching of setState?

Andrew Del Prete
Andrew Del Preteinstructor
~ 3 years ago

In the new setState calls, shouldn't we use the function form so nothing can go wrong with batching of setState?

I meant to refactor this to be a functional component which cleans things up substantially and helps show the power of the wrapping State component. I haven't experienced an issue with conflicting setState yet but you make a valid point!

Andrew Del Prete
Andrew Del Preteinstructor
~ 3 years ago

^ Next lessons will utilize functional components + React PowerPlug