remarkjs / remark-react

Deprecated plugin to transform to React — please use `remark-rehype` and `rehype-react` instead
524 stars 37 forks source link

Pass `position` into props #50

Closed s-panferov closed 6 years ago

s-panferov commented 6 years ago

Hello. I'm trying to implement two-panel view and to achieve good scrolling and navigation experience I'd like to use position information from MDAST. But it seems that react children have no access to an original Position structure.

Is it possible to add this functionality?

davidtheclark commented 6 years ago

This is another good use case for a more flexible custom components API. Let's think about this as part of the request in https://github.com/mapbox/remark-react/issues/48.