I have a list that is loaded after the api returns, this list populates a FlatList. By clicking on any item I would like to mark it with the status it was viewed: userViu
How can I change the item just clicked.
[
{
"id": 3,
"codigoCondominio": "1212",
"dataVencimento": "2018-03-10T00:00:00",
"descricao": "Pagamento de taxa de licenciamento",
"valor": 23900.9,
"flagBloqueio": false,
"dataBloqueio": null,
"idUsuarioConcordou": null,
"createTime": "2018-03-23T01:35:29.957",
"arquivado": false,
"dataPagamento": null,
"numeroLancamento": 0,
"codigo": "1212",
"nome": "Edificio 0001",
"usuarioViu": null,
"flagVisualizado": null,
"vencido": true
},
{
"id": 4,
"codigoCondominio": "1212",
"dataVencimento": "2018-03-10T00:00:00",
"descricao": "Pacto administradora",
"valor": 45000,
"flagBloqueio": true,
"dataBloqueio": null,
"idUsuarioConcordou": null,
"createTime": "2018-03-23T01:36:06.52",
"arquivado": false,
"dataPagamento": null,
"numeroLancamento": 0,
"codigo": "1212",
"nome": "Edificio 0002",
"usuarioViu": null,
"flagVisualizado": null,
"vencido": true
}
]
In simplifying I would like to change the first object [0] .userViu = true
I'm working with React-native, Redux-saga