Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Html.ReactInitJavaScript() outputs server only components in initialization code #340

Closed
@heinzmuller

Description

@heinzmuller

Using @Html.React("Component", ..., serverOnly: true) still adds the ReactDOM.render() calls to the @Html.ReactInitJavaScript() output which breaks pages using server only components. (It also wraps the output in an unnecessary container element)

Looking through the code there seems to be missing a bool in the ReactEnvironment CreateComponent method that sets the component to be server only and thus skipped when outputting the init code for all components

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions