1 possible answer(s) on “SVG width is not set to screen width

  1. Perhaps you want scale to fit? https://www.w3.org/TR/SVG11/coords.html#ViewBoxAttribute
    And a bit different viewBox value, seems you flipped x and y.

    import * as React from 'react';
    import { Svg, Path } from 'react-native-svg';
    
    export default () => (
      <Svg
        width="100%%"
        height={100}
        viewBox="0 0 800 400"
        preserveAspectRatio="none">
        <Path
          d="M 800 300 Q 400 350 0 300 L 0 0 L 800 0 L 800 300 Z"
          fill="blue"
          stroke="red"
        />
      </Svg>
    );