Git Product home page Git Product logo

Comments (3)

jpsierens avatar jpsierens commented on July 25, 2024

Thanks for letting me know. It is indeed not working. I'll have a look.

from webpack-react-redux.

jpsierens avatar jpsierens commented on July 25, 2024

This is a hard to fix problem it seems... It's coming from react-router. When I remove everything that has to do with the router the hot reloading works fine.

I haven't found a good solution yet, but I have managed to make the page reload when there's a change. I know it's not the same as actually hot reloading it though.

Change your Root.dev.js to this:

import React, { Component, PropTypes } from 'react';
import { Provider } from 'react-redux';
import routes from '../routes';
import DevTools from './DevTools';
import { Router } from 'react-router';

export default class Root extends Component {
    render() {
        const { store, history } = this.props;
        return (
            <Provider store={store}>
                <div>
                    <Router history={history} routes={routes} />
                    <DevTools />
                </div>
            </Provider>
        );
    }
}

if (module.hot) {
    module.hot.decline("../routes.js");
}

Root.propTypes = {
    store: PropTypes.object.isRequired,
    history: PropTypes.object.isRequired
};

#remix-run/react-router#2704

from webpack-react-redux.

jpsierens avatar jpsierens commented on July 25, 2024

I just changed from react-transform to React Hot Loader 3 and HMR is now working! It still gives the error message about the router not liking being changed though

I took this as an example
https://github.com/gaearon/redux-devtools/tree/master/examples/todomvc

from webpack-react-redux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.