Skip to content

Skip adding to _components during ReactWithInit#1155

Merged
dustinsoftware merged 1 commit into
mainfrom
issue-890
Sep 13, 2020
Merged

Skip adding to _components during ReactWithInit#1155
dustinsoftware merged 1 commit into
mainfrom
issue-890

Conversation

@dustinsoftware
Copy link
Copy Markdown
Member

Fixes #890

false,
true
true,
false
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

cb-eli commented Sep 23, 2020

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

@dustinsoftware
Copy link
Copy Markdown
Member Author

dustinsoftware commented Sep 23, 2020 via email

@cb-eli
Copy link
Copy Markdown

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