Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Upgrade frontend to React 18#3353

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ammario merged 20 commits intomainfromreact-18
Aug 22, 2022
Merged

Upgrade frontend to React 18#3353

ammario merged 20 commits intomainfromreact-18
Aug 22, 2022

Conversation

ammario
Copy link
Member

Closes#961

@Kira-Pilot
Copy link
Member

@ammario thanks for doing this! We wanted to discuss some of the React 18 changes in FE Variety before merging up - there are some rendering differences between 17 and 18. Do you mind if we hold off until then? We can mark it as a draft for now.

presleyp and jsjoeio reacted with thumbs up emoji

@ammario
Copy link
MemberAuthor

@ammario thanks for doing this! We wanted to discuss some of the React 18 changes in FE Variety before merging up - there are some rendering differences between 17 and 18. Do you mind if we hold off until then? We can mark it as a draft for now.

How about I fix these rendering concerns right now?

@Kira-Pilot
Copy link
Member

How about I fix these rendering concerns right now?

Well, it's not so much fixing them (although there might be some of that) so much as it is understanding them. Here is theReact article discussing the changes we are most curious about. Some questions I have (although I haven't finished reading this through) are:

  • how will this work when running tests locally, especially considering we often make use of Jest'stoBeCalledTimes?
  • Are there workarounds? Should we be limiting use ofuseEffect (probably)? There's a whole issue threadhere.

None of that necessarily needs to be addressed in this PR - I just think usually we give folks a chance to read through the change logs before upgrading.
Would you like to join our next FE variety? We all committed to discuss the reading then. It would be nice to hear your perspective considering you did the upgrade already!

presleyp reacted with thumbs up emoji

@presleyp
Copy link
Contributor

Yeah we had decided to discuss this in FE V so I'd like to go ahead and do that. It's best to take tickets that have been groomed - this one was still in Enqueue because we were waiting on the discussion.

@ammario
Copy link
MemberAuthor

Ok. I'm happy to attend the next one. Please add me to the invite.

@ammario
Copy link
MemberAuthor

I intend on handling this end to end so it shouldn't add any work to your plates.

@Kira-Pilot
Copy link
Member

@presleyp can add you to the invite!

@socket-security
Copy link

socket-securitybot commentedAug 15, 2022
edited
Loading

Socket Security Report

Dependency issues detected. If you merge this pull request, you will not be alerted to the instances of these issues again.

📜 New install scripts detected

A dependency change in this PR is introducing new install scripts to your install step.

PackageScript fieldLocation
core-js@3.24.1 (upgraded)postinstallsite/package.json via@storybook/addon-actions@6.5.9
core-js-pure@3.24.1 (upgraded)postinstallsite/package.json via@pmmmwh/react-refresh-webpack-plugin@0.5.7
Socket.dev scan summary
IssueStatus
Did you mean?✅ no new possible package typos
Install scripts⚠️ 2 new install scripts detected
Telemetry✅ no new telemetry
Troll package✅ no new troll packages
Malware✅ no new malware
Native code✅ no new native modules

Powered bysocket.dev

<ErrorSummary
error={props.createWorkspaceErrors[CreateWorkspaceErrors.GET_TEMPLATES_ERROR]}
/>
) : (
<></>
Copy link
Member

Choose a reason for hiding this comment

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

Instead of rendering a fragment here if the condition isn't met, we should be able to do this:

       {!!props.createWorkspaceErrors[CreateWorkspaceErrors.GET_TEMPLATES_ERROR] && (          <ErrorSummary            error={props.createWorkspaceErrors[CreateWorkspaceErrors.GET_TEMPLATES_ERROR]}          />        )}

The error message you're encountering is TS's confusing way of telling you that it's not evaluating the condition as a boolean, so it needs you to explicitly cast it as such.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Gotcha. I thought the ternary was clearer, but the!! syntax makes sense too.

@Kira-Pilot
Copy link
Member

@ammario this is good to go when you're ready to merge up. Theact warnings work has been captured in#3626.

@ammario
Copy link
MemberAuthor

Thank you@Kira-Pilot. You deserve the clout on the git history for this one.

@ammarioammario merged commit2ee6acb intomainAug 22, 2022
@ammarioammario deleted the react-18 branchAugust 22, 2022 20:42
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@Kira-PilotKira-PilotKira-Pilot approved these changes

@presleyppresleypAwaiting requested review from presleyp

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Upgrade to React 18+
4 participants
@ammario@Kira-Pilot@presleyp@BrunoQuaresma

[8]ページ先頭

©2009-2025 Movatter.jp