3.0.1 • Published 5 years ago

maquette-jsx v3.0.1

Weekly downloads
1,227
License
MIT
Repository
github
Last release
5 years ago

maquette-jsx

This library allows you to use the JSX notation with maquette. This allows you to write code like this:

let render = () => {
  return <div>
    { nameInput.render() }
    <p class="output">
      Hello {name || 'you'}!
    </p>
  </div>;
}

Getting started

  • Install maquette-jsx by running npm install maquette maquette-jsx
  • When using Typescript: Add the following lines to your tsconfig.json:
    • "jsx": "react"
    • "jsxFactory": "jsx"
  • When using babel: Add the following plugin:
    • "plugins": [ ["transform-react-jsx", {"pragma": "jsx"}] ]
    • Call maquette-jsx's enableGlobalJsx function before calling maquette's createProjector()
  • You can now return JSX from your render functions

Example

https://github.com/AFASSoftware/maquette-typescript-jsx-starter

3.0.1

5 years ago

3.0.0

6 years ago

2.1.2-0

6 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.0.0

7 years ago