Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SVG support dependency note #6783

Merged
merged 1 commit into from
Apr 10, 2019
Merged

Add SVG support dependency note #6783

merged 1 commit into from
Apr 10, 2019

Conversation

pnarielwala
Copy link
Contributor

Hello!

It seems like importing SVGs as components does not work with react versions before 16, even with up-to-date react-scripts. Thought this documentation should be updated to include that note.

Thanks!

react@^15.6.2 and [email protected]
Screen Shot 2019-04-09 at 4 17 44 PM

import Logo from './logo.svg'
console.log(Logo) // output: /static/media/logo.5d5d9eef.svg

Hello!

It seems like importing SVGs as components does not work with `react` versions before 16, even with up-to-date `react-scripts`. Thought this documentation should be updated to include that note.

Thanks!
@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@iansu iansu added this to the 3.0 milestone Apr 10, 2019
@iansu iansu merged commit e59e092 into facebook:master Apr 10, 2019
@iansu
Copy link
Contributor

iansu commented Apr 10, 2019

Thanks!

@ianschmitz
Copy link
Contributor

@iansu it looks like forwardRef was added in React 16.3: https://github.com/facebook/react/blob/master/CHANGELOG.md#1630-march-29-2018

@pnarielwala pnarielwala deleted the patch-1 branch April 10, 2019 19:26
@iansu
Copy link
Contributor

iansu commented Apr 10, 2019

@ianschmitz Thanks. I'll update the docs.

@lock lock bot locked and limited conversation to collaborators Apr 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants