aksonov / aksonov/react-native-svg-elements

changing the fill through a prop only works once

Aberta
#5 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Objective-C
Estrelas
40
Forks
2
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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!

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.