Attempt to recreate and understand React
- None at all
- Just one hook
- You can make your own component(s)?
- Support for functional and class-ish components
- Poorly documented yay!
- Basically just as React
- Babel required
- Babel will transpile JSX with our custom function
const Didact = {
createElement,
render,
useState
}
const element = (
<div>
<h1>Hello World</h1>
</div>
);
const container = document.getElementById("root");
Didact.render(element, container);
function App(){
return (
<div>
<h1>Hello World</h1>
</div>
)
}
const element = <App />
const container = document.getElementById("root");
Didact.render(element, container);
- Just use React or CRA
Rodrigo Pombo's Build your own React