Skip to content
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

React 16.13 #1145

Merged
merged 22 commits into from
Mar 10, 2020
Merged

React 16.13 #1145

merged 22 commits into from
Mar 10, 2020

Conversation

Marc-Andre-Rivet
Copy link
Contributor

@Marc-Andre-Rivet Marc-Andre-Rivet commented Mar 4, 2020

Closes https://github.com/plotly/dash-core/issues/75

Sorry, something went wrong.

@Marc-Andre-Rivet Marc-Andre-Rivet changed the title React 16.12 React 16.13 Mar 5, 2020

initialization(props) {
useEffect(() => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rewriting the ApiController as a functional component allows the use of useEffect which covers didMount / didUpdate lifecycle events. willReceiveProps is now also covered by it because the two first lifecycle methods already cover the same grounds, if slightly differently.

@@ -60,8 +47,16 @@ class UnconnectedContainer extends Component {
}

if (isEmpty(dependenciesRequest)) {
dispatch(
apiThunk('_dash-dependencies', 'GET', 'dependenciesRequest')
setTimeout(
Copy link
Contributor Author

@Marc-Andre-Rivet Marc-Andre-Rivet Mar 5, 2020

Choose a reason for hiding this comment

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

remove setTimeout (experiment)

@@ -102,6 +102,7 @@
"no-new-wrappers": ["error"],
"no-param-reassign": ["error"],
"no-process-env": ["warn"],
"no-prototype-builtins": ["off"],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

myObject.hasOwnProperty(...) is fine

@@ -141,7 +142,7 @@
}],
"no-magic-numbers": ["error", {
"ignoreArrayIndexes": true,
"ignore": [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 100, 10, 16, 0.5, 25]
"ignore": [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 100, 10, 16, 0.5, 25, 200, 500]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

some xhr return codes

@Marc-Andre-Rivet Marc-Andre-Rivet marked this pull request as ready for review March 6, 2020 00:30
Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

Looks great! I like the functional components & hooks, let's do more of those :)
💃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants