Skip to content

Add getType override #3

@chrisvxd

Description

@chrisvxd

Currently you're forced to use the type for component type lookups. It would be good to have this overridable for use with systems like GraphQL, which natively expose the __typename property.

Something like:

const getType = obj => obj.__typename;

return <ReactFromJSON ... getType={getType} />

With the default value

const getType = obj => obj.type;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions