Skip to content

Instantly share code, notes, and snippets.

@danott
Created May 12, 2016 22:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danott/3ae21423c435128c09190860c0900375 to your computer and use it in GitHub Desktop.
Save danott/3ae21423c435128c09190860c0900375 to your computer and use it in GitHub Desktop.
React + Rails
<div id="person_form"></div>
<script>
ReactDOM.render(
React.createElement(PersonForm, <%= @person.to_json.html_safe %>),
document.getElementById("person_form")
)
</script>
ReactDOM.render(
React.createElement(PersonForm, <%= @person.to_json.html_safe %>),
document.getElementById("person_form")
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment