Skip to content

Use the special string only for context key #1

@mjackson

Description

@mjackson

It seems like the only place we should use the special string is for the key on context, to avoid clashes with others. Everything else we can make generic.

const [ Emitter, Subscriber ] = createContextEmission('keyOnContext')

<Emitter value={someValue}/>

<Subscriber>
{value => (
  // ...
)}
</Subscriber>

Just seems like less docs to do it this way, no?

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