Skip to content

React.Router ReactDOM.hydrate with ClientOnly #1140

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

Closed
4 tasks done
JensMeire opened this issue Jul 17, 2020 · 3 comments
Closed
4 tasks done

React.Router ReactDOM.hydrate with ClientOnly #1140

JensMeire opened this issue Jul 17, 2020 · 3 comments

Comments

@JensMeire
Copy link
Contributor

JensMeire commented Jul 17, 2020

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: 5.2.4
  • JavaScriptEngineSwitcher: 3.5.1
  • 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: Windows 10
  • .NET Framework or .NET Core Version: .NET Framework

Steps to reproduce


Hello :)

I was running into following error Prop 'className' did not match. Server: "MenuItemWrapper SelectedMenuItem" Client: "MenuItemWrapper" and I stumbled on #521 .

I'm using the React.Router package and my project uses a URL query parameter to define a default selected menuitem.
I saw in PR#541 ReactComponent checks on clientOnly but this is not the case for ReactRouterComponent.

Is this intentional? if so, why?
Thanks in advance!

@dustinsoftware
Copy link
Member

dustinsoftware commented Jul 17, 2020 via email

@JensMeire
Copy link
Contributor Author

@dustinsoftware Sure :)

dustinsoftware added a commit that referenced this issue Jul 22, 2020
* Added UseServerSideRendering and ClientOnly check to ReactRouterComponent

* Small changes

* Use auto-property for ClientOnly

Co-authored-by: Dustin Masters <[email protected]>
@dustinsoftware
Copy link
Member

Released :)

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

2 participants