Skip to content

Instantly share code, notes, and snippets.

@jasonneylon
Last active October 22, 2015 16:47
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 jasonneylon/f42bd541ee41ea031a73 to your computer and use it in GitHub Desktop.
Save jasonneylon/f42bd541ee41ea031a73 to your computer and use it in GitHub Desktop.
Creating React address component
// The props for the React component are initally set from the server side
const addressConfig = #{@address_config.to_json};
// the component is rendered inside the form at a marker div embedded in the server generated HTML
const addressInstance = React.render(
React.createElement(Address, addressConfig),
document.getElementById("#billing_address")
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment