SVG doesn't work after upgrading SDK version

Several of Expo’s libraries need to be imported differently in SDK 33 and later compared to how it was done in SDK 32.

e.g. for SVG, instead of this:

import { Svg } from 'expo';
...
<Svg ...>
  <Svg.Circle ... />
</Svg>

do:

import Svg, { Circle } from 'react-native-svg';
...
<Svg ...>
  <Circle ... />
</Svg>

Check the documentation for the other things you’re importing to see if they have changed too.

EDIT:

One way to help with this is to run:

npx expo-codemod sdk33-imports

You may also need to install new dependencies. e.g.:

expo install expo-constants
2 Likes