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

upgrade node to v16, and update dependencies #1

Merged
merged 3 commits into from
Dec 31, 2021

Conversation

xiangxn
Copy link

@xiangxn xiangxn commented Dec 29, 2021

upgrade node to v16, and update dependencies

Copy link
Member

@abitmore abitmore left a comment

Choose a reason for hiding this comment

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

Thanks. @sschiessl-bcp please take a look. Permissions granted.

@abitmore
Copy link
Member

abitmore commented Dec 29, 2021

By the way, if need permissions for other repositories (I have added some already), please let me know.

@@ -38,7 +41,7 @@ class ComponentA extends React.Component {
this.state = props.alt.stores.store.getState()
}

componentWillMount() {
componentDidMount() {
Copy link

@sschiessl-bcp sschiessl-bcp Dec 29, 2021

Choose a reason for hiding this comment

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

We are changing here the hook in the React lifecycle. While this is likely ok, we need to be aware that if we encounter strange re-rendering of components this might be a cause of it

Copy link
Member

Choose a reason for hiding this comment

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

I guess this change is wrong..

Choose a reason for hiding this comment

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

Assuming the intention of componentWillMount has not been abused, componentDidMount is the replacement recommendation
https://reactjs.org/docs/react-component.html#unsafe_componentwillmount

The alternative would be to use UNSAFE_componentWillMount

Choose a reason for hiding this comment

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

I just noticed this is used in test/batching-test.js, so definitely not a blocker for the PR. But, important to keep in mind when we are updating the UI

Copy link
Member

Choose a reason for hiding this comment

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

OK. Thanks for the info.

@sschiessl-bcp
Copy link

@xiangxn the UI runs ok and as expected with this I assume?

@xiangxn
Copy link
Author

xiangxn commented Dec 30, 2021

@xiangxn the UI runs ok and as expected with this I assume?

The impact in componentWillMount will not be too great. The modification here mainly depends on whether the test can be completed after the update.
If setState() is used in componentWillReceiveProps, it is quite dangerous. In order not to affect the logic, it is best to just add the UNSAFE prefix.
The node environment is mainly updated here, with some updateable dependencies, as far as possible not to affect the original logic.

@xiangxn
Copy link
Author

xiangxn commented Dec 30, 2021

In addition, I will put the lib directory together for ease of reference.

@xiangxn xiangxn merged commit 0c499b8 into bitshares:master Dec 31, 2021
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.

3 participants