<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Recommended way to import SVGs as Components in Developer Q&amp;A Forum</title>
    <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Recommended-way-to-import-SVGs-as-Components/m-p/204279#M146</link>
    <description>&lt;P&gt;What is the recommended way to bring SVGs into a Dynatrace App as a Component, so that it can be styled dynamically? React has several “standard”-ish ways through libraries: SVGR, react-svg, etc. Is there support already built into whichever loader the CLI uses under the hood?&lt;/P&gt;</description>
    <pubDate>Thu, 20 Apr 2023 07:50:59 GMT</pubDate>
    <dc:creator>lucas_hocker</dc:creator>
    <dc:date>2023-04-20T07:50:59Z</dc:date>
    <item>
      <title>Recommended way to import SVGs as Components</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Recommended-way-to-import-SVGs-as-Components/m-p/204279#M146</link>
      <description>&lt;P&gt;What is the recommended way to bring SVGs into a Dynatrace App as a Component, so that it can be styled dynamically? React has several “standard”-ish ways through libraries: SVGR, react-svg, etc. Is there support already built into whichever loader the CLI uses under the hood?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 07:50:59 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Recommended-way-to-import-SVGs-as-Components/m-p/204279#M146</guid>
      <dc:creator>lucas_hocker</dc:creator>
      <dc:date>2023-04-20T07:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Recommended way to import SVGs as Components</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Recommended-way-to-import-SVGs-as-Components/m-p/204404#M148</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/32376"&gt;@lucas_hocker&lt;/a&gt;,&amp;nbsp;and thanks for your question! Currently we have no built-in support.&lt;BR /&gt;&lt;BR /&gt;Your options are to either use SVG or IMG element inline with JSX to render SVG, or inline with import of the SVG string. You can also further "componentize" your implementation to further abstract it in your code.&lt;BR /&gt;&lt;BR /&gt;Alternatively, as you mentioned, you can use SVG react libraries (with or without webpack) as well, though we do not at this point have any recommended way.&lt;BR /&gt;&lt;BR /&gt;EDIT: Using webpack alongside the CLI is not straight forward though. It&amp;nbsp;&lt;SPAN&gt;would skip/duplicate the entire build step that within the CLI, as the CLI uses esbuild and not webpack.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 09:35:01 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Recommended-way-to-import-SVGs-as-Components/m-p/204404#M148</guid>
      <dc:creator>robaxelsen</dc:creator>
      <dc:date>2023-02-09T09:35:01Z</dc:date>
    </item>
  </channel>
</rss>

