Skip to content

Children of Consumer without new line gives "TypeError: render is not a function" #12241

Closed
@ryepesg

Description

@ryepesg

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

I get a confusing error when not using a new line in the children of a Consumer un the new Context API:
https://codesandbox.io/s/13n733xp5j

Error:
selection_108

Fix:
selection_109

What is the expected behavior?

Component just getting redered

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

16.3.0-alpha.1 and 16.3.0-alpha.0, Chromium 63, Archilinux. React 16.2 didn't support the new Context Api.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions