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

@dcramer dcramer force-pushed the ref/update-lots-of-deps branch from 2a30a03 to f6c4895 Compare November 11, 2019 19:48
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 dcramer force-pushed the ref/update-lots-of-deps branch from 95e79dc to ec8bd5b Compare November 11, 2019 22:25
@dcramer dcramer force-pushed the ref/update-lots-of-deps branch from ec8bd5b to e3809a6 Compare November 11, 2019 22:26
@dcramer dcramer force-pushed the ref/update-lots-of-deps branch from d2bc470 to 2deb6a4 Compare November 12, 2019 01:28
@dcramer
Copy link
Member Author

dcramer commented Nov 12, 2019

this PR is now very much 🤞

@dcramer dcramer force-pushed the ref/update-lots-of-deps branch from b22e00b to 1db34e8 Compare November 12, 2019 01:37
@dcramer dcramer force-pushed the ref/update-lots-of-deps branch from 61b75ff to 32a25ac Compare November 12, 2019 21:52
@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.

1 participant