1.0.0 • Published 4 years ago

@henrique.futema/thresh v1.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

Run npm install or yarn

To Install all dependencies

npm run dev or yarn dev

Open: http://localhost:1234/

Examples

State management
import manageState from './state/manageState'
//Create state
manageState.createState('count', 0);

//Get state
const data = manageState.getState()

// Set state
manageState.setState('count', 1) 

Hello world - Create element

Description: for now children needs to be a array

//...
createElement('h1', {
  children:["Hello World"]
}

Bind state

Description: you need to pass the state as parameter!!

manageState.createState('name', "Thresh");
createElement('h1', {
  children:["Hello World {{ state.name }}"]
}

tModel -> get a value from input
  //...
    attrs:{
      value: state.name,
      tModel: 'name'
    }

tClick -> onClick
  //...
    attrs:{
      id: "btn",
      tClick: {
        method: test,
        id: 'btn'
      }

Thresh CLI

Documentation at https://github.com/HenriqueFutema/CLI-Thresh

NPM Link: https://www.npmjs.com/package/thresh-cli

...

1.0.0

4 years ago