Giter VIP home page Giter VIP logo

Comments (3)

emmenko avatar emmenko commented on June 23, 2024

Yeah, I think it happens whenever you change something in the index.js file. I can try to find a solution for that...

from redux-react-router-async-example.

gaearon avatar gaearon commented on June 23, 2024
module.hot.accept('./i18n', () => {
  let i18n = require('./i18n');
  // do something with the new version to re-render
});

from redux-react-router-async-example.

emmenko avatar emmenko commented on June 23, 2024

@jonaswindey I've kept now index.js very simple so that it doesn't get easily hot reloaded, hence the warning is gone if you update for example the locales.

screen shot 2015-09-28 at 22 16 14

@gaearon thanks for the tip. I'm not sure how to use it though as it's used here and I'm not sure how should I replace it.

If I do it this way and I try to change something nothing actually re-renders although I can see in the console that it's updated...

diff --git lib/Root.js lib/Root.js
index 8d61fc3..409e56d 100644
--- lib/Root.js
+++ lib/Root.js
@@ -9,7 +9,7 @@ import configureStore from './utils/configure-store'
 import * as storage from './persistence/storage'
 import * as components from './components'
 import * as constants from './constants'
-import * as i18n from './i18n'
+// import * as i18n from './i18n'

 const {
   About,
@@ -34,6 +34,11 @@ const initialState = {

 export const store = configureStore(initialState)

+let i18n = require('./i18n')
+module.hot.accept('./i18n', () => {
+  i18n = require('./i18n')
+})
+
 function getRootChildren (props) {
   const intlData = {
     locale: props.application.locale,

screen shot 2015-09-28 at 22 23 26

Can you give me an hint maybe how it needs to be done correctly? Thanks!

from redux-react-router-async-example.

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.