React-native: borderColor์— ๋Œ€ํ•œ ์ƒ‰์ƒ ๋ณด๊ฐ„์œผ๋กœ InvalidProp ์˜ค๋ฅ˜ ๋ฐœ์ƒ

์— ๋งŒ๋“  2016๋…„ 06์›” 20์ผ  ยท  1๋…ผํ‰  ยท  ์ถœ์ฒ˜: facebook/react-native

0๊ณผ 1 ์‚ฌ์ด์—์„œ ๋ณ€๊ฒฝ๋˜๋Š” Animated.Value๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํ…Œ๋‘๋ฆฌ ์ƒ‰์ƒ์— ์• ๋‹ˆ๋ฉ”์ด์…˜์„ ์ ์šฉํ•˜๋ ค๋Š” ์› ๋ณด๊ธฐ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. https://facebook.github.io/react-native/docs/animated ์˜ ๊ฐ€์ด๋“œ๋ฅผ

     borderColor: this.state.active.interpolate({
        inputRange: [0, 1],
        outputRange: ['rgba(0, 0, 0, 0)', 'rgba(0, 0, 0, 1)']
      })

๊ทธ๋Ÿฌ๋ฉด ์•ฑ(Android)์— ๊ฒฝ๊ณ ๊ฐ€ ์ƒ์„ฑ๋ฉ๋‹ˆ๋‹ค.

index.android.bundle:29278Warning: Failed propType: Invalid prop `borderColor` supplied to `View`: [object Object]
Valid color formats are
  - '#f0f' (#rgb)
  - '#f0fc' (#rgba)
  - '#ff00ff' (#rrggbb)
  - '#ff00ff00' (#rrggbbaa)
  - 'rgb(255, 255, 255)'
  - 'rgba(255, 255, 255, 1.0)'
  - 'hsl(360, 100%, 100%)'
  - 'hsla(360, 100%, 100%, 1.0)'
  - 'transparent'
  - 'red'
  - 0xff00ff00 (0xrrggbbaa)

Bad object: {
  "borderWidth": 2,
  "justifyContent": "center",
  "alignItems": "center",
  "width": 200,
  "height": 200,
  "borderRadius": 100,
  "borderColor": "rgba(0, 0, 0, 0)"
} Check the render method of `Circle`.

์œ„์˜ ๊ฒฝ๊ณ ์—์„œ borderColor๊ฐ€ ์˜ฌ๋ฐ”๋ฅธ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ๊ทธ๊ฒƒ์€ ์—ฌ์ „ํžˆ โ€‹โ€‹๊ฒฝ๊ณ ๋ฅผ์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค.

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

์‚ฌ์šฉํ•˜์—ฌ ๊ณ ์ • <Animated.View> ๋Œ€์‹  <View>

>๋ชจ๋“  ๋Œ“๊ธ€

์‚ฌ์šฉํ•˜์—ฌ ๊ณ ์ • <Animated.View> ๋Œ€์‹  <View>

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰