airbnb / airbnb/babel-plugin-inline-react-svg

Pass refs to the svg element

Open
#13 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
474
Forks
90
PR merge metrics
No merged PRs in 30d

Description

Hey, do you have any idea on how this plugin could support refs? Functional components don't support refs, so out of the box, it's not possible to simply write ` this.node = node} />`. Switching to a class component could work. Supporting some form of `innerRef` property could also work. What is your opinion on the matter?

Contributor guide

No contributing guide indexed for this repository

Research direction

No file, test, or entry point is named in the issue. Start by reviewing how the plugin transforms SVGs into React components and determine whether the requested API is a forwarded ref or an innerRef prop. Done means a defined, tested ref behavior for the generated SVG element.

Written by the indexing model from the issue text.

Assessment

Tech stack
babel, javascript, react
Domain
frontend, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.