The main goal of this library is to prove that Flux can be implemented in a way compatible with full hot reloading (and explore how this can be done). You can run the example code with npm start, change action creators or stores, and the new logic will kick in before you refresh.
This file contains 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 React from 'react'; | |
import $script from 'scriptjs'; | |
require('postscribe/htmlParser/htmlParser.js'); // This is required for postScribe, postScribe is a bit annoying. | |
const postscribe = require('exports?postscribe!postscribe'); // Needs webpack exports-loader! Otherwise, just require it and use window.postscribe. | |
// This GlobalAdCodePromise is a simple promise that uses script.js to load a javascript file and then resolve. | |
const GlobalAdCodePromise = new Promise((resolve) => { | |
setTimeout(() => { | |
$script('http://annoying.adprovider.com/ad.js', () => { |