Maybe render a React component, maybe not 😮
// Get it! yarn add mayre npm install --save mayre
While working with React you'll find yourself making conditionals components quite a lot of times. And they're always the same: a component which upon a set of conditions may render or just return null (or short-circuit it).
Here comes Mayre (Maybe render)! A very simple and ultra light (533 bytes) component to tackle this issue from the
Compatible with React, React-Native and ReactVR.
There are three props you can use:
... read the whole story at github.com.
of can be a component instance or declaration. And when can be boolean or a function.