1.1.4 • Published 5 years ago

ls-react v1.1.4

Weekly downloads
6
License
ISC
Repository
github
Last release
5 years ago

ls-react

A little library to make writing React code in LiveScript a little nicer.

Usage

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 + 1

  div {},
    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.

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.0.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago