Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

ref: Update to latest react, redux, and various supporting libs #228

Merged
merged 14 commits into from Nov 13, 2019

Conversation

dcramer
Copy link
Member

@dcramer dcramer commented Nov 11, 2019

No description provided.

@dcramer
Copy link
Member Author

dcramer commented Nov 11, 2019

Aside the requireAuth stuff I abstracted as it will make some things easier to maintain in the future. Wasn't required for these updates.

styled-components seems to be throwing warnings, so not sure if we just need to switch to emotion/similar, but thats probably an easy one

componentWillReceiveProps(nextProps, nextContext) {
let isRouterInContext = !!nextContext.router;
let isLocationInProps = nextProps.location !== undefined;
componentDidUpdate(prevProps) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

50% chance this breaks behavior, but given the router object is likely the same, the behavior might be the same

// TODO(dcramer): make this simply call AsyncComponent instead of extend
export default class AsyncPage extends AsyncComponent {
static propTypes = {
params: PropTypes.object,
location: PropTypes.object
};

componentWillMount() {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicated from AsyncComponent

Copy link
Member Author

@dcramer dcramer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried to update react-router, but couldnt handle the awfulness of the APIs. Tried to switch to @reach/router, similar concerns as react-router (albeit slightly nicer). tl;dr react-router@3 is the last acceptable routing solution in JS land.

transitionName="toast"
transitionEnter={false}
transitionLeaveTimeout={500}>
<TransitionGroup enter={false}>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this is not behaving the same as before, but i gave up after 10 minutes. it at least works mostly ok

@dcramer dcramer force-pushed the ref/update-lots-of-deps branch 2 times, most recently from d30e411 to 95e79dc Compare November 11, 2019 22:10
package.json Outdated
"react-gravatar": "^2.6.3",
"react-icon-base": "^2.0.8",
"react-icons": "^2.2.7",
"react-loadable": "^5.3.1",
"react-redux": "^5.0.5",
"react-router": "3.2.0",
"react-redux": "5",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reduxjs/react-redux#1161

enzyme's shallow rendered doesnt work with react-redux 6+

@dcramer
Copy link
Member Author

dcramer commented Nov 12, 2019

this PR is now very much 🤞

@dcramer dcramer merged commit da2799f into master Nov 13, 2019
@dcramer dcramer deleted the ref/update-lots-of-deps branch November 13, 2019 18:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant