jaredLunde / jaredLunde/snowpack-plugin-svgr
React.RefForwardingComponent deprecated
- Dominant language
- TypeScript
- Stars
- 18
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
The custom type suggested:
```ts
declare module '*.svg' {
const ref: React.RefForwardingComponent<
SVGSVGElement,
React.SVGAttributes
>
export default ref
}
```
Uses the deprecated property `RefForwardingComponent`.
**Expected behavior**
I'm not sure what the proper replacement/migration is.
Contributor guide
Research direction
Start with the custom TypeScript declaration for '*.svg' shown in the issue and review React's replacement for the deprecated RefForwardingComponent type. Confirm the supported migration and update the declaration so SVG imports no longer use the deprecated property; done means the suggested type compiles without that deprecation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100