sjsx
v0.1.4
Published
> A super simple implementation of the JSX specification.
Downloads
4
Readme
sjsx
A super simple implementation of the JSX specification.
Really, another one?
Yes, because:
- No current implementation of JSX contained the features I wanted, with all the ones it doesn't need.
- Tooling
Features
- Standard DOM attributes
- Use
class
andonclick
! OrclassName
andonClick
, if you're into that.
- Use
- Render DOM references alongside JSX
- I hate using
ref
and lifecycle callbacks. This removes them for my life forever, hallelujah!
- I hate using
- No
class
components- Completely pointless. Hyperapp gets it. Even React is moving away from them with Hooks.
- No automatic re-rendering of components
- By giving up this so-called "convenience," we gain more control to fine-tune exactly when and where our app needs to be updated. There are
render
andpatch
functions available. This also gives us the additional benefit of:
- By giving up this so-called "convenience," we gain more control to fine-tune exactly when and where our app needs to be updated. There are
- No virtual DOM state stored in memory
- Again, not necessary. Hyper fast diffs and patching can be accomplished via the DOM, especially if we're not re-rendering everything when any piece of our state or data changes.
- Fragments
- Because wrapper hell is real.
children
as a separate argument- Makes your app easier to read and understand.
- Stupid simple tooling (COMING SOON)
- Because wtf eject? Really? Have a complete solution with production and development environments, up and running in less than a minute.
- Small, under 3KB gzipped
- And I haven't even tried to optimize this yet, which will only make this even smaller in the near future.