fdaciuk / workflow-reactjs

My workflow with ReactJS + Webpack 3+
146 stars 51 forks source link

Remove require and add App which was previously imported. #1

Closed ghost closed 7 years ago

ghost commented 7 years ago

I believe that as previously imported the ./app , can use it in this condition.

fdaciuk commented 7 years ago

Actually, we must re-require the module to get its updates. In theory, if we use the module previously imported, we'll be using the same reference all the time, and component will not be hot loaded =)

Have you tested this?

ghost commented 7 years ago

Apparently it works Correctly, but it may make sense what you are saying to the other components.

let's leave it :)

fdaciuk commented 7 years ago

I'll close this PR for now, but I'll try it more deeply to be sure that it not have any other side effect xD Thanks for your contribution :D