Comments (8)
I like to make this easy on you, so i just rebased it on your latest commit.
And a screenshot for good measure:
from react-slingshot.
I'm considering it but haven't had a chance to try them myself yet. If someone submits a PR I'd likely merge it.
from react-slingshot.
I'm nowhere yet, but since you're interested: I followed their tutorial and made a (extremely minimalistic) start at https://github.com/barrystaes/react-slingshot/tree/feature-devtools
My next step would be "Exclude DevTools from Production Builds" but i'm not sure how to do that in react-slingshot without seperating the webpack.config.js
and configureStore.js
files into prod/dev versions. I'd be happy to hear your take on this.
from react-slingshot.
Off the top of my head, you could look at webpack.hotModuleReplacementPlugin(). Then in src/store/configureStore.js
, if module.reduxDevtools (or however you specify it) is defined, you could import the Devtool container, and then compose the reducers with Devtools.instrument(). Otherwise, do nothing.
Similarly, in src/containers/App.js
, you could check if module.reduxDevtools is set before adding it to the App.
Does that make sense?
from react-slingshot.
@barrystaes The webpack.config.js in this project is actually a factory for a webpack config. You pass it an environment and it returns a config. So no separate file is necessary.
Anyway, thanks Barry. I want to spend some time getting comfortable with the Redux devtools. Looks like you've got a great start.
from react-slingshot.
Ok thanks! With your suggestions i completed my feature-devtools branch. I kept the code minimal.
Choices i made; (all covered in their tutorial)
- A popup window instead of
redux-devtools-dock-monitor
. Less code, and stays out of the way of your UI. - No
persistState()
added. Its usefull to reproduce bugs with?debug_session=reproducing_weird_bug
and is easily added. - A prod/dev version for
configureStore.js
so that the debug module/component code is not included in production builds. Same goes for the window code insrc\index.js
. A must honestly, not a choice.. but i'm still not happy with the duplication there, a dev version that wraps the prod version would be better. But i dont know how i could do that here without having to complicate that code even more. - Just use the default
redux-devtools-log-monitor
view. Some drop-in alternatives areredux-devtools-diff-monitor
andredux-devtools-filterable-log-monitor
.
Just clone and build, it works comfortably. :)
Things i could improve on? Do you want me to make a PR?
from react-slingshot.
Wow, this looks great! I'm eager to try it out! And yes, a PR would be great. 👍
from react-slingshot.
For posterity: PR #27 was not merged but i'll leave https://github.com/barrystaes/react-slingshot/tree/feature-devtools available for now.
from react-slingshot.
Related Issues (20)
- Use redux-saga
- npm run remove-demo doesn't work
- Terminal font becomes invisible after npm start
- Error running 'npm install' HOT 1
- Switch Redux logic setup to use Redux Toolkit HOT 4
- Involving Database HOT 4
- why there are yarn.lock and package-lock.json both present? HOT 6
- Implementation of redux-persist with react-slingshot HOT 5
- [WARNING] Removing the demo app also removes files that do not belong to the demo app
- Get error when execute "npm start" command. HOT 1
- Required Information about peripheral files. HOT 2
- Update README about python version HOT 1
- Refused to execute inline script because it violates the following Content Security Policy directive:
- facing issue while npm run setup HOT 2
- Opentest issue
- npm run on production environment
- Add Flow please
- npm ERR! [email protected]
- jest: not found
- Build 16x fails not 18x or 20x
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-slingshot.