Skip to content

Handle "empty" render() calls in noInline mode #151

Closed
@wagerfield

Description

@wagerfield

When noInline mode is enabled and you call render with no arguments, React throws the error: https://reactjs.org/docs/error-decoder.html/?invariant=152&args[]=n

This can be seen on the React Live demo site if you scroll to the last example and delete the contents of the render call.

You get "An unexpected error has occurred." printed to the screen and there's no going back. You have to refresh the page to remedy this error.

It would be better if React live gracefully caught this error and printed it to LiveError in the same way that it does when the code is set to an empty string in "normal/inline" mode.

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