FullstackStation / react-native-svg-animated-linear-gradient

A wrap SVG component for animated linear gradient
MIT License
435 stars 110 forks source link

expo above sdk 33 , console : expo deprecated #22

Closed hoangnh2912 closed 5 years ago

hoangnh2912 commented 5 years ago

console show that when i use it :

The following APIs have moved to separate packages and importing them from the "expo" package is deprecated: Svg, Svg.ClipPath, Svg.Defs, Svg.G, Svg.LinearGradient, Svg.Rect, Svg.Stop.

  1. Add correct versions of these packages to your project using:

    expo install react-native-svg

    If "install" is not recognized as an expo command, update your expo-cli installation.

  2. Change your imports so they use specific packages instead of the "expo" package:

    • Svg.ClipPath -> import { ClipPath } from 'react-native-svg'
    • Svg.Defs -> import { Defs } from 'react-native-svg'
    • Svg.G -> import { G } from 'react-native-svg'
    • Svg.LinearGradient -> import { LinearGradient } from 'react-native-svg'
    • Svg.Rect -> import { Rect } from 'react-native-svg'
    • Svg.Stop -> import { Stop } from 'react-native-svg'
    • import { Svg } from 'expo' -> import * as Svg from 'react-native-svg'
virusvn commented 5 years ago

hi @neckgamervn Just use this package in latest version & follow above way. If you have any problem with latest version, please let me know.