aksonov / aksonov/react-native-svg-elements

changing the fill through a prop only works once

Ouverte
#5 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
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.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.