1.0.11 • Published 2 years ago
@grasse/core v1.0.11
Introduction
Do you ever feel it's hard to sync data between variable and rendered DOM?
Then, maybe this package is for you. With this, you can change variable, and rendered DOM will be changed without using virtual DOM.
Example
From this line of code:
import * as Grasse from '@grasse/core'
let count = ((0))
let powered = count ** 2
document.body.append(<button onclick={()=>{count++}}>Clicked {((count))} times!</button>)
document.body.append(<div>{((count))} * {((count))} = {((powered))}</div>)
We made clicky button:
*Disclaimer -> This code needs to be compiled using babel using @grasse/babel-plugin-transform plugin, don't forget to use JSX preset, and it's recomended to use unbundled development bundler like snowpack (not sponsored)