Created
August 7, 2015 07:36
-
-
Save jackcallister/ad121efaaab9ce826a77 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Flux from './Flux.js' | |
import Flux from './components/App.jsx' | |
// Within document ready | |
const payload = document.getElementById('payload'); | |
const flux = new AppFlux(); | |
flux.serialize(payload); | |
React.render( | |
<FluxComponent flux={flux}> | |
<App /> | |
</FluxComponent>, | |
document.getElementById('app') | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Controller | |
def action | |
@payload = {MyStore: { data: [] }} | |
end | |
# View | |
<input value=<%= @payload %> type='hidden' id='payload' /> # Be sure to stringify hash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment