Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sean-clayton/ls-react
A little library to make writing React code in LiveScript a little nicer.
https://github.com/sean-clayton/ls-react
functional-programming javascript livescript react
Last synced: 22 days ago
JSON representation
A little library to make writing React code in LiveScript a little nicer.
- Host: GitHub
- URL: https://github.com/sean-clayton/ls-react
- Owner: sean-clayton
- License: isc
- Created: 2019-06-29T03:10:47.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-12T08:50:59.000Z (almost 3 years ago)
- Last Synced: 2024-12-14T18:22:24.007Z (26 days ago)
- Topics: functional-programming, javascript, livescript, react
- Language: LiveScript
- Homepage: https://www.npmjs.com/package/ls-react
- Size: 1.26 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ls-react
A little library to make writing React code in LiveScript a little nicer.
### Usage
```ls
require! {
react: {use-state}
'react-dom': ReactDOM
'ls-react': {h, div, button, h1, p}
}App = ({ title }) ->
[count, set-count] = use-state 0
increment = -> set-count count + 1div {},
h1 class-name: 'heading', title
p {} "Count is: #{count}"
b on-click: increment, "+"ReactDOM.render(
h App, title: 'Yo!'
document.getElementById "root"
)
```For more usage examples, check out the `examples` directory.