Skip to content

Conversation

dustinsoftware
Copy link
Member

Fixes #890

@@ -250,7 +255,8 @@ public void RenderFunctionsCalledNonLazily()
new { },
null,
false,
true
true,
false
Copy link
Member

Choose a reason for hiding this comment

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

Let's use named arguments for all these booleans to make it clearer (eg. skipLazyInit: false)

Copy link
Member Author

Choose a reason for hiding this comment

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

Regrettably, msbuild does not allow that in this case.

An expression tree may not contain a named argument specification

@cb-eli
Copy link

cb-eli commented Sep 23, 2020

Thanks for the fix!
When are you planning to release it?

@dustinsoftware
Copy link
Member Author

dustinsoftware commented Sep 23, 2020 via email

@cb-eli
Copy link

cb-eli commented Sep 23, 2020

Oh, I see that the option was added to IReactEnvironment.CreateComponent, but when HtmlHelperExtensions.ReactWithInit is calling IReactEnvironment.CreateComponent, it doesn't use the skipLazyInit parameter.

Is it intentional?
Maybe it's better to add the skipLazyInit parameter to HtmlHelperExtensions.ReactWithInit as well?
So the user can decide from outside if he wants to exclude this component or not?

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.

Duplicate rerendering when using ReactWithInit
3 participants