Skip to content

Expose HAST nodes to components #19

@Rokt33r

Description

@Rokt33r

Subject of the feature

I want to access HAST nodes from React components to use position or custom attributes of nodes when rendering.

Problem

For now, there is no way to access because rehype-react is tightly bound to hast-to-hyperscript, which consumes Node.

Expected behavior

A React component should be able to access its Node info somehow.

Alternatives

Passing a node instance via node prop.

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