-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement React [email protected] #393
Implement React [email protected] #393
Conversation
Anyone have any clues on getting those checks to pass? |
@TobiahRex, as the logs state there were some network issues. I know that |
Thanks for adding the spacing around the |
@nickytonline Good Feedback! Saw the logs but didn't want to assume without peer input since I have little exposure to yarn. The node version change log entry also made me double check my own node version and alas I was out of date (since updated). Also, copy all @ yarn.lock file. Will add react router package changes and re-commit ASAP. break... @mikedevita haha yeah I'm a stickler for that stuff. All thanks to eslint w/airbnb style guide extension. |
@ALL, apologies for the typos... "reach" = each* "npm i react-router --save" =
|
src/store/configureStore.js
Outdated
@@ -30,6 +36,9 @@ function configureStoreDev(initialState) { | |||
thunk, | |||
]; | |||
|
|||
const reactRouterMiddleware = routerMiddleware(history); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't push to the array, instead declare the array below all this and just include it inline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oshalygin
Fair enough. I'll change it.
package.json
Outdated
"react-router": "3.0.0", | ||
"react-router-redux": "4.0.7", | ||
"react-router-dom": "4.0.0", | ||
"react-router-redux": "5.0.0-alpha.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels a bit rough to be using an alpha package. Many of us are using this library for projects and these things will inevitably break into beta+
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I'd like to avoid taking on alpha/beta dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh didn't see this one here still. @TobiahRex, can the RR4 PR use a stable version of react-router-redux
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about replace react-router-redux (which is still in alpha) with connected-react-router ?
Thanks so much for the PR! 👍 💯 I agree that we need to wait until all deps are out of alpha. But this PR is an excellent foundation once react-router-redux goes 5 final releases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TobiahRex as mentioned in the comments already and also as @coryhouse said, let's wait until everything is out of alpha for dependencies.
@nickytonline & @coryhouse Understood. Many thanks for the feedback. |
What is the need/use-case for react-router-redux? Why include it? It understand it adds the location to the store, but what benefit does that have? Does it still warrant being included in slingshot? The only valid case I have for this at this point is redux dev tools time travel. I ask not to try and push this through, but more so to ensure we asked and answered the question. This was something I chose to remove when I move our company projects to RRv4. |
@kwelch Great question. Outside of a dev environment, i'm not sure there's a benefit of react-router-redux. The guys' description @ it's npm page even says...
Perhaps the idea here with react-slingshot is based on giving devs the best possible development environment available. However, the original creators would have to speak on that to confirm. |
@coryhouse / @nickytonline How do you feel about dropping react-router-redux? |
@kwelch, I've never used it so I'll let you and @coryhouse make that call.
…On Tue, Mar 21, 2017 at 8:37 AM Kyle Welch ***@***.***> wrote:
@coryhouse <https://github.com/coryhouse> / @nickytonline
<https://github.com/nickytonline> How do you feel about dropping
react-router-redux?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#393 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAy2z65e-25hW7sK3jRMIe5trhi7RLOFks5rn8ShgaJpZM4Me6BQ>
.
|
@nickytonline update on upgrading the yarn.lock file... I'm currently in Japan on a freelance job and will be for few more months. I've attempted to update the yarn.lock file with the upgrades to react-router version numbers & add react-router-dom & react-router-redux. Problem is, all 3 locations I've attempted to do this from, are giving me
errors from the yarn cli. After some research, (yarnpkg/yarn#668) it appears to be a common issue if the internet bandwidth is less than 2-2.5mb/s. Alas, this is my case here in Japan from all 3 locations. So, I'll continue to try, however someone stateside may have a faster time upgrading the yarn.lock file. I'll re-commit as soon as I am successful. |
Thanks @TobiahRex, as long as you have opened write access to maintainers, we should be able to push a commit to fix the lock file. |
FYI: I decided to a try complete removal of my node_modules/ and then run Result:
|
@TobiahRex, looks like there's conflicts. Also, CI is failing with your latests commit. |
@nickytonline Forgot to rebase master & PR branch from the latest PR merges. In progress now. Will re-commit ASAP. |
Coverage decreased (-0.7%) to 94.595% when pulling 3efc625 on TobiahRex:[email protected]/tobiahrex into c4b0cf7 on coryhouse:master. |
@kwelch & @nickytonline Rebase complete. Couple notes...
|
"react-router-redux": "4.0.8", | ||
"react-router": "4.2.0", | ||
"react-router-dom": "4.0.0", | ||
"react-router-redux": "5.0.0-alpha.6", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just want to ask this again before we move forward...
Are we sure we want to keep this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc: @coryhouse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I vote for dropping it. Easy to add if desired, and avoids an alpha dep
The router changes look good. I am nervous that it shows so much diff in other areas. I would not have expected that after a rebase. |
@@ -1,5 +1,5 @@ | |||
import React from 'react'; | |||
import {Link} from 'react-router'; | |||
import { Link } from 'react-router-dom'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which formatting does our linter support? Spacing between {} in imports or none? I can't remember. cc: @kwelch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, I know I prefer with spaces. I also believe prettier default is with spaces.
@@ -1,5 +1,5 @@ | |||
import React from 'react'; | |||
import {shallow} from 'enzyme'; | |||
import { shallow } from 'enzyme'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above.
<td><label>Date Modified</label></td> | ||
<td>{fuelSavings.dateModified}</td> | ||
</tr> | ||
<tr> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once again, question about the spacing changes. Is this our eslint config doing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nickytonline This one looks like its from my text-editor. I use an atom package language-babel
to automatically calculate JSX spacing. In this particular case, i think i nudged it over accidentally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TobiahRex - Would you be willing to rollback the whitespace changes in this PR to keep the diff minimal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nickytonline & @coryhouse After checking again, i think this is a correct addition of whitespace. The <tr>
should appear as a child of <tbody>
and not a sibling due to hierarchical precedence, correct? If you'd still like me to revert back to what it was before, i can do that. please confirm.
@kwelch, it looks like a lot of the changes are spacing changes. |
Good point, that may be prettier related. I don't think we currently are |
I think this is all set with one outstanding questions see below. OPEN QUESTION: Do we want to continue to use/support |
@kwelch & @coryhouse
So my point is, if we remove the On a personal note, I find using redux's route history storage highly convenient. A couple use cases of mine:
Overall i think the benefit is simply not having to access a global browser api (window) for extracting /mutating route data. |
Just for reference, I tried to roll in I'm open to using something that works and if people have an alternative I'd love to hear it and I'd love to try it out and let you know if it works. Sidenote: |
@TobiahRex I, like @oshalygin, found myself in a different mental model for routes after RRv4 and did not require the ability to push from within an action. I understand that I am not the only voice, I also don't want to introduce and support something that is in alpha as the purpose of slingshot is to make entry into the React ecosystem more approachable. I am good with either approach. My main objective is to ensure this project remains stable, friendly, and approachable to all. |
src/components/Root.js
Outdated
@@ -1,6 +1,7 @@ | |||
import React, { Component } from 'react'; | |||
import PropTypes from 'prop-types'; | |||
import { ConnectedRouter } from 'react-router-redux'; | |||
console.log('%cConnectedRouter', 'background:red;', ConnectedRouter); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a console.log slipped in
src/store/configureStore.js
Outdated
@@ -1,15 +1,20 @@ | |||
import {createStore, compose, applyMiddleware} from 'redux'; | |||
import reduxImmutableStateInvariant from 'redux-immutable-state-invariant'; | |||
import thunk from 'redux-thunk'; | |||
import createHistory from 'history/createBrowserHistory'; | |||
// 'routerMiddleware': the new way of storing route changes with redux middlware since rrV4. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing "e" in middleware
@TobiahRex - Thanks for the thoughtful input on react-router-redux. I'm torn on whether to include it given its alpha status and the ease with which it can be added in - but I'm good with leaving it since it's already in here. I made some simple requests for changes. Thanks so much for the hard work on the PR Tobiah! |
Coverage decreased (-0.7%) to 94.595% when pulling 975fe9e on TobiahRex:[email protected]/tobiahrex into c4b0cf7 on coryhouse:master. |
@coryhouse - Saw and fixed issues per your feedback. Thanks for the review. Understood on being torn. Happy to contribute and I'll continue re-basing until we're ready to merge. |
@TobiahRex - Looks like FuelSavingsForm.js still has unnecessary whitespace changes. Can you please revert? |
@coryhouse I left a note asking for confirmation before reverting. I think the white space you're referring to is correct due to hierarchical precedence of |
@@ -32,48 +32,48 @@ class FuelSavingsForm extends React.Component { | |||
<h2>Fuel Savings Analysis</h2> | |||
<table> | |||
<tbody> | |||
<tr> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nickytonline & @coryhouse
I believe the white spacing change I made here is correct. Should not a <tr>
appear as a child of a <tbody>
in this case and not a sibling? Please confirm you'd like it to appear as a sibling and I'll revert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Point taken. You can leave it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@coryhouse thanks for the confirmation.
I'm good w/ merging this. Any remaining reservations? @kwelch @nickytonline |
Not see anything out of the ordinary. LGTM |
LGTM too.
…On Sat, Sep 2, 2017 at 2:49 PM Kyle Welch ***@***.***> wrote:
Not see anything out of the ordinary. LGTM
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#393 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAy2z4uKGRMAIeLV3RO_23DJ4Z5cofQFks5seaNVgaJpZM4Me6BQ>
.
|
Merged! 🎉 Thanks so much for your hard work @TobiahRex! |
@coryhouse Thank you! Back when I first started learning React, the slingshot repo and your plural sight course was my first exposure. Really happy to contribute. |
Hi Cory,
Here's your hot fresh PR. :)
I've implemented [email protected] under branch "[email protected]/tobiahrex".
CHANGE NOTES:
index.js:
App.js: Everything that was in "routes.js" is now converted (per my understanding of rrV4) and implemented here.
configureStore.js: nothing outside of the docs except...
About, HomePage, NotFoundPage:
package.json:
Thanks for the suggestions to contribute and being open. Let me know if I can do/change anything.
Respectfully,
-Toby