React Native’s base set of components are amazing! <View> enforcing flexbox and defaulting to {flexDirection: 'column', position: 'relative'}? So smart.

It is such a successful set of components and constraints that web developers (like me) are bringing them to the web. …

MobX inject() example

“A Higher-Order Component”

What does that mean?

“Well, if a higher-order function is a function that takes a function and returns a new function as the result, then a higher-order component must be a component that takes a component and returns a new component as the result, right?”

That is…

What is an “injector component”?

An injector component takes props, optionally computes new ones, then injects them into its child via React.cloneElement(). Crucially, it also does not add any new components to the DOM. It only exists in React's virtual DOM.

When Are Injector Components Useful?

In the prototyping framework, constelation, we use a LOT of injector components to…

When I first learned about spreading props in JSX, I was thrilled! It is just so convenient to pass props with <MyComponent {...this.props} />, and override props defined after the spread, like <MyComponent {...this.props} text='override text prop' />. I knew it made for a great developer experience, but I always…

Kyle Poole

Full stack web and mobile developer at Chronstruct.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store