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

Support for React v18 #1326

Open
4 tasks done
va-timorris opened this issue Feb 16, 2023 · 2 comments
Open
4 tasks done

Support for React v18 #1326

va-timorris opened this issue Feb 16, 2023 · 2 comments

Comments

@va-timorris
Copy link

va-timorris commented Feb 16, 2023

Thanks for filing a bug! To save time, if you're having trouble using the library, please check off the items you have tried. If you are just asking a question, skip right to the bottom.

Please verify these steps before filing an issue, and check them off as you go

  • The relevant native JavascriptEngineSwitcher library packages are installed (such as JavaScriptEngineSwitcher.V8.Native.win-x64)
  • The VC++ 2017 runtime is installed
  • The value of SetUseReact and SetUseBabel is correct in ReactConfig.cs or Startup.cs
  • I've looked at the sample projects in this repo to verify that my app is configured correctly

I'm using these library versions:

  • ReactJS.NET:
  • JavaScriptEngineSwitcher:
  • react and react-dom: (N/A if using bundled react, or version number)
  • webpack: (N/A if using bundled react)
  • node: (N/A if using bundled react)

Runtime environment:

  • OS: (Mac, Windows, Linux flavor. Include 32-bit/64-bit and version)
  • .NET Framework or .NET Core Version:

Steps to reproduce

In Startup.cs:

app.UseReact(config => {
config
.SetReuseJavaScriptEngins(true)
.SetLoadBabel(false)
.SetLoadReact(false)
.SetReactAppBuildPath("~/js/webpacked/react");
});

... run npm install [email protected] --save
... run npm install [email protected] --save

I've updated my version of react and react-dom to 18.2.0 -- It seems that this breaks React.NET with the following error:

ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot

The current version of React.NET is pretty old - is this being updated to support React 18?

@MrSmoke
Copy link

MrSmoke commented Feb 21, 2023

The library is in maintenance mode as per the pinned issue #1315

@LorenDorez
Copy link

Im looking to bring support for v18 but is going to be a fair bit of work. I started a discussion here incase anyone has comments/concerns. #1343

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

No branches or pull requests

3 participants