2.0.1 • Published 7 years ago

svenjsx v2.0.1

Weekly downloads
3
License
-
Repository
github
Last release
7 years ago

SVENJSX

SVENJSX is a support tool for SvenJS. It allows you to write JSX syntax in your render code, like this:

var Sven = require("svenjs");
var clickyComponent = Sven.create({
    initialState: {
        clicks: 0
    },
    render() {
    let svenFunc = () =>{
      this.setState({clicks: this.state.clicks++ });
    }
    return (<div id="row">
        <div id="app">
            <h3>The Click App</h3>
            <button onClick={svenFunc}>Why not click me?</button>
        </div>
        <div id="time-travel">
            <h3>Click stats</h3>
          <p>You have clicked on the button {this.state.clicks} times</p>
        </div>
    </div>)
    }
});

Related Modules

ISC Licensed

2.0.1

7 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.1

10 years ago