https://github.com/elixirscript/elixirscript_react
React Library for ElixirScript
https://github.com/elixirscript/elixirscript_react
elixir elixirscript react
Last synced: 6 months ago
JSON representation
React Library for ElixirScript
- Host: GitHub
- URL: https://github.com/elixirscript/elixirscript_react
- Owner: elixirscript
- Created: 2017-07-29T19:11:21.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-17T20:22:23.000Z (almost 8 years ago)
- Last Synced: 2025-09-06T12:51:52.793Z (6 months ago)
- Topics: elixir, elixirscript, react
- Language: JavaScript
- Size: 922 KB
- Stars: 57
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# ElixirScriptReact
A library for using [React](https://facebook.github.io/react/) with ElixirScript
## Example
```elixir
use React.HTML
def my_section()
section id: "todoapp" do
header id: "header" do
h1 do
"todos"
end
input [
id: "new-todo",
placeholder: "What needs to be done?",
autoFocus: true,
onKeyPress: fn(event, _) -> process_event(event) end
]
end
end
end
ReactDOM.render(my_section(), "my_dom_container_query")
```
`my_dom_container_query` is a string that is passed to `document.querySelector` in the browser
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `elixir_script_react` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:elixir_script_react, "~> 16.2.0"}
]
end
```
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/elixir_script_react](https://hexdocs.pm/elixir_script_react).