https://github.com/featurist/pogo-react
React.js components in PogoScript instead of JSX
https://github.com/featurist/pogo-react
Last synced: 20 days ago
JSON representation
React.js components in PogoScript instead of JSX
- Host: GitHub
- URL: https://github.com/featurist/pogo-react
- Owner: featurist
- License: bsd-2-clause
- Created: 2014-02-23T10:43:09.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-02-23T18:38:13.000Z (almost 12 years ago)
- Last Synced: 2025-01-20T11:21:42.664Z (12 months ago)
- Language: PogoScript
- Size: 117 KB
- Stars: 2
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pogo-react
A little DSL for writing [react.js](http://facebook.github.io/react/) components as [PogoScript](http://pogoscript.org) CommonJS modules, instead of using [JSX](http://facebook.github.io/react/docs/jsx-in-depth.html)
## Usage
Start with a module looking like this:
module.exports = component {
render () =
div (
p { id = 'para' } "First paragraph"
p { class = 'zomg' } "Second paragraph"
)
}
...compile it to JavaScript like this:
require('pogo-react').compile! ("./component.pogo", "./component.js")
...then use it from React like this:
Component = require('./component.js')
instance = Component { prop = 'value' }
React.renderComponent(instance, document.body)
## License
BSD