aksonov / aksonov/react-native-svg-elements
changing the fill through a prop only works once
- Langage dominant
- Objective-C
- Étoiles
- 40
- Forks
- 2
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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!
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.