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

[Desktop] [Web] Update templates to react 18 #287

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Jake-Screen
Copy link
Contributor

Updating desktop and web templates to react 18 and change to using createRoot to render applications

@Jake-Screen Jake-Screen marked this pull request as ready for review July 19, 2023 15:44
@Jake-Screen
Copy link
Contributor Author

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"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be minor?

Copy link
Contributor Author

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

Copy link
Contributor

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?

Copy link
Contributor Author

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?

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to minor

@aruniverse
Copy link
Member

@ben-polinsky is right that i would consider this a minor change in the template as well
idk if we need this pr atm / if we want to start pushing everyone to start using react 18 just yet


root.render(
<React.StrictMode>
<App />
Copy link
Member

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

Copy link
Contributor Author

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?

Copy link
Member

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

Copy link
Contributor Author

@Jake-Screen Jake-Screen Jul 19, 2023

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?

Copy link
Member

Choose a reason for hiding this comment

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

yes

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

3 participants