4 ms·
This is all just pure ES6, and each JSX block is converted like return ( <div>Hi {name}</div> ); becomes return R`<div>Hi ${name}</div>; As well as that
by dosy 8y ago
This is all just pure ES6, and each JSX block is converted like
return ( <div>Hi {name}</div> );
becomes
return R`<div>Hi ${name}</div>;
As well as that R function there's also a ~200 line render function. That's pretty much it. To copy the functionality of React as presented in that guide.
The guide: https://reactjs.org/docs/state-and-lifecycle.html https://reactjs.org/docs/state-and-lifecycle.html
Source on github: https://github.com/dosyago-coder-0/racked-js-react-without-babel-in-500-lines https://github.com/dosyago-coder-0/racked-js-react-without-b...