aksonov / aksonov/react-native-svg-elements

changing the fill through a prop only works once

未關閉
#5 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Objective-C
星號
40
分支
2
PR 合併指標
30 天內沒有已合併 PR

描述

Hi,
I have an SVG I created and it receives the 'fill' and 'stroke' as props. When I initially render the SVG it works fine. However, once the prop changes, the color doesn't change (even though the component did re-render itself).

This is the component:

``` coffeescript
'use strict'

React = require('react-native')
{ Svg, G, Path } = require('react-native-svg-elements')

NotificationsIcon = React.createClass
render: ->

module.exports = NotificationsIcon
```

And I call it like this:

``` coffeescript

iconColor: -> if @props.selected then colors.actionBlue else colors.baseWhite
```

I am seeing the exact same behaviour with other icons. Any ideas?

Thanks!

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。