flux-redux icon indicating copy to clipboard operation
flux-redux copied to clipboard

update support for Redux-Logger 3

Open kevguy opened this issue 8 years ago • 4 comments

First of all, I'm running the code on a Mac and /public/assets/*.js files can't be found when I run webpack-dev-server. So I modified webpack.config.js to fix it.

I'm using version 3 of Redux-Logger, so import logger from 'redux-logger'; will lead to an error saying we should use import { createLogger } from 'redux-logger' instead. So I also made some changes accordingly.

screen shot 2017-04-18 at 6 49 05 pm

Overall all the code are the same. I just made some slight changes to make it work.

kevguy avatar Apr 18 '17 10:04 kevguy

Not sure if changing assets to public/assets might break some of the other code?

danielstern avatar Apr 19 '17 10:04 danielstern

I don't know, because in every branch when I tried to run webpack-dev-server, I'll get an error saying it couldn't find the bundled js file. At first I would run webpack to produce the js files in the public folder and then modify the src links in every html file to make it work. I found it too exhausting so I decided to modify the webpack config instead. I don't know if this change would break in other machines but at least that's how I made everything work.

On the other hand, I think the change to Redux-Logger is definitely necessary. So how about I split the changes into two pull requests (one for webpack and one for logger) instead?

kevguy avatar Apr 19 '17 12:04 kevguy

Sounds good, I'd say that createLogger() does need to be changed, so please split up the PR

danielstern avatar Apr 20 '17 13:04 danielstern

I've removed my changes to webpack.config.js and only kept the modified code for Redux-Logger 3.

kevguy avatar Apr 21 '17 04:04 kevguy