iamdustan / tiny-react-renderer
- пятница, 13 мая 2016 г. в 03:12:16
JavaScript
Learn you a React Renderer for Great Good
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 target 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 all of your application code, you enter this world
with a call like the following:
// web
React.render(React.createElement(MyApp), document.getElementById('app'));
// native
AppRegistry.registerComponent('MyApp', () => MyApp);
Both of these end at the React{Target}Mount.js
file. Your renderer should
begin there.
To get started, begin reading from ./src/mount.js.
Please note this guide is a work in progress.