0.0.3 • Published 6 years ago
fjsx v0.0.3
Fjsx
A counter example:
var counter$ = 0; // An option: If variables ending with $ they are observable.
var view = (
<>
<button onClick={() => counter$++}> + </button>
{counter$}
<button onClick={() => counter$--}> - </button>
</>
); // Bonus! view is a real DOM element(s)
document.body.appendChild(view);
The above example can work because our compiler compiles to knockout style observable functions.
You can browse our todomvc example for a more advanced example.
fjsx-examples is a configured project for starting.
API
TODO
Acknowledgement
Some ideas are inspired from surplus