-
Notifications
You must be signed in to change notification settings - Fork 15
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
[Desktop] [Web] Update templates to react 18 #287
base: master
Are you sure you want to change the base?
Conversation
Tested desktop and web viewer templates with these changes. The resizeObserver loop error no longer occurs with this update. |
{ | ||
"packageName": "@itwin/cra-template-desktop-viewer", | ||
"comment": "Update to React 18, see [their changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)", | ||
"type": "patch" |
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.
Should be minor?
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.
My thought process was that we just bumped the minor when we merged in the react 18 upgrade for the rest of the repo, so this is just more along the same line
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.
Not quite following. Wouldn't "more along the same line" mean this should be minor as well?
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.
I mean that as in this should have been included in the previous pr. Should this warrant another minor version bump if it is only including the update from the previous pr?
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.
Ah that was one of the interpretations :) If we are releasing these together, then only one minor change will occur - they're all grouped together. At any rate, the type of change shouldn't be dependent on other changes. If it's a minor change, then it's a minor change. Even if we released and published your first PR changes, someone could download that version. Then we make this change which is minor by definition (if I am correct), but only marked as a patch. The next time that user goes to install, even if they have their minor version pinned, they'll get this update.
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.
Changed to minor
common/changes/@itwin/cra-template-web-viewer/jake-template-update_2023-07-19-15-21.json
Outdated
Show resolved
Hide resolved
@ben-polinsky is right that i would consider this a minor change in the template as well |
|
||
root.render( | ||
<React.StrictMode> | ||
<App /> |
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.
does the desktop test app actually work in react 18 with strict mode?
i noticed some issues with the acr pkgs on my end
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.
It is working for me both as the test app in the repo and as the updated template. What specific errors are you seeing?
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.
im using the 1.0.0 version of the ACR pkgs, and they dont actually seem to fetch the itwins/imodels in the grids
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.
from the errors when upgrading to @itwin/imodel-browser-react it looks like the 1.0.0 version removes the support for ProjectGrid. Upgrading to the 1.0.0 version will have to wait for my other pr moving to the itwins api to finish.
Table this for now and complete the other pr first?
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.
yes
Updating desktop and web templates to react 18 and change to using
createRoot
to render applications