bvaughn / tiny-react-renderer

Learn you a React Renderer for Great Good

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tiny React Renderer

Creating a React Renderer will give you the opportunity to apply the same React knowledge that you and your team already know and enjoy from the web and native to whatever host environment you need.

Creating a renderer is a fairly straight-forward affair once you know what you’re looking for.

Many languages have this concept of a main—the entry point to your application. If you look at any React application code you’ve written you’ll see that you “start” your app with a call like the following:

// web
ReactDOM.render(React.createElement(MyApp), document.getElementById('app'));

// native
AppRegistry.registerComponent('MyApp', () => MyApp);

This is where your application enters into the React domain and comes alive.

If you follow either the ReactDOM or React Native codebases from where these methods are defined you will quickly find yourself at the React{Host}Mount.js file. Our renderer also begins there.

With that let’s get started! Our tour continues in ./src/mount.js.

Work in Progress

Please note this guide is a work in progress. Much of this knowledge is derived from my experience in creating React Hardware.

Thanks

About

Learn you a React Renderer for Great Good


Languages

Language:JavaScript 100.0%