2.0.1 • Published 6 years ago

svenjsx v2.0.1

Weekly downloads
3
License
-
Repository
github
Last release
6 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

6 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.1

9 years ago