This package has been deprecated

Author message:

this package has been deprecated

xypjs
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

xypjs

JavaScript frontend framework. Inspired by Angular and React

npm version npm total downloads Codacy Badge

Quick start

You can create webpack application manually. However, you can use new-webpack-app command.

npm install -g new-webpack-app

Then create new app with JSX pragma xyp.jsx:

new-webpack-app --jsx xyp.jsx awesomepage

Browse to newly created folder and install xypjs:

npm install xypjs

Example app:

import xyp, { Component } from "xypjs";

class Counter extends Component {
  render() {
    console.log(this.props);
    return <p>{this.props.count}</p>;
  }
}

class App extends Component {
  constructor(props) {
    super(props);
    this.bindToReactiveStorage({ counter: 0 });
    this.onClick = this.onClick.bind(this);
  }
  onClick() {
    this.setState({ counter: this.state.counter + 1 });
  }
  render() {
    return (
      <div>
        <button onClick={this.onClick}>+</button>
        <Counter count={this.state.counter} />
      </div>
    );
  }
}
xyp.render(<App />, document.getElementById("app"));

Run npm start and open http://localhost:9000 to see an app. Page will reload if source code changes.

Run npm run build to bundle app in build/ folder.

Dependents (0)

Package Sidebar

Install

npm i xypjs

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

37.8 kB

Total Files

10

Last publish

Collaborators

  • unkrush