Skip to content

[Proposed Post]: support ref in React As prop docs #1303

@R-Bower

Description

@R-Bower

Proposed topic title:

React AS Prop

Topic description:

Topic already exists

Link to existing draft:

https://github.com/playfulprogramming/playfulprogramming/blob/main/content/christianvm/posts/react-as-prop/index.md

Part of series:

No response

Resources

https://github.com/playfulprogramming/playfulprogramming/blob/main/content/christianvm/posts/react-as-prop/index.md

Other Notes

React 19 released with support for ref as a prop. I use the As approach for component polymorphism in development. This article can be updated to add support for refs:

https://github.com/playfulprogramming/playfulprogramming/blob/main/content/christianvm/posts/react-as-prop/index.md

ComponentPropsWithoutRef<E> can be ComponentPropsWithoutRef<E> & {ref?: ComponentPropsWithRef<C>["ref"]}

Metadata

Metadata

Assignees

No one assigned

    Labels

    blog postFor issues/PRs primarily related to blog posts as opposed to the code of the site

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions