- Notifications
You must be signed in to change notification settings - Fork928
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@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. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
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:
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. |
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. |
Ok. I'm happy to attend the next one. Please add me to the invite. |
I intend on handling this end to end so it shouldn't add any work to your plates. |
@presleyp can add you to the invite! |
socket-securitybot commentedAug 15, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Socket Security ReportDependency issues detected. If you merge this pull request, you will not be alerted to the instances of these issues again. 📜 New install scripts detectedA dependency change in this PR is introducing new install scripts to your install step.
Socket.dev scan summary
Powered bysocket.dev |
<ErrorSummary | ||
error={props.createWorkspaceErrors[CreateWorkspaceErrors.GET_TEMPLATES_ERROR]} | ||
/> | ||
) : ( | ||
<></> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Thank you@Kira-Pilot. You deserve the clout on the git history for this one. |
Closes#961