npm.io
4.0.0 • Published 5 years ago

o-blue-print

Licence
ISC
Version
4.0.0
Deps
2
Size
12 kB
Vulns
0
Weekly
0

BluePrint

A library to decouple rendering from logic in a React application

Installation

npm install o-blue-print

Summary

BluePrint concept is quite simple

First half, is to give to all React Components with application logic, as opossed to rendering logic alone, a blue print with the specifications of what it should render. Then, let the Component render it, rather than passing data in loose props

The other half, is to move all logic, not strictly related to the rendering phase, out from the Component, to its BluePrint

With this approach, no component ever need to call .setState({...}) to update the program GUI

Components call named methods on their BluePrints, and it's each BluePrint the one to invalidate the current state, to produce a new rendering phase

Keywords