From 384ebde340fb0035b8ebc460290247744f3ad4e4 Mon Sep 17 00:00:00 2001 From: Parth Narielwala Date: Tue, 9 Apr 2019 16:14:51 -0500 Subject: [PATCH] Add SVG support dependency note 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! --- docusaurus/docs/adding-images-fonts-and-files.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/adding-images-fonts-and-files.md b/docusaurus/docs/adding-images-fonts-and-files.md index c481d96c75d..217a19775eb 100644 --- a/docusaurus/docs/adding-images-fonts-and-files.md +++ b/docusaurus/docs/adding-images-fonts-and-files.md @@ -44,7 +44,7 @@ An alternative way of handling static assets is described in the next section. ## Adding SVGs -> Note: this feature is available with `react-scripts@2.0.0` and higher. +> Note: this feature is available with `react-scripts@2.0.0` and higher, and `react@16.0.0` and higher. One way to add SVG files was described in the section above. You can also import SVGs directly as React components. You can use either of the two approaches. In your code it would look like this: