Questions tagged as 'redux'

1
answer

Retrieve item index into list to delete

I'm trying to make a demo application for bookmarking (Bookmarks). I can retrieve in a list what I type in the 3 inputs I have on my screen (Description, URL and tag), and I can include as many items as I want in this list. But I can not retr...
asked by 25.05.2018 / 05:11
1
answer

How to get the state of a reducer within a component with React Native

Hello, I'm new to React Native and I'm having trouble getting the status of a reducer for a component I made. it is as follows: import React from 'react' import { connect } from 'react-redux' import { View, Text } from 'react-native' class Fo...
asked by 06.11.2018 / 20:56
1
answer

Callback with Redux-thunk

I would like to know how I would do to have a return on dispath call something like this, with React: this.props.store.dispatch(dados, result => { console.log(result); }); In this line above console.log never enter! index....
asked by 10.09.2018 / 20:02
1
answer

How can I change the state of an array item in React Native

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,...
asked by 24.03.2018 / 22:55
1
answer

Execute function managed by Redux

My app React Native is managed by Redux . I need to run the _verificaLogin() function automatically by connect when my app is rendering. The way I did it is not working, I think props has not received the functi...
asked by 13.02.2018 / 19:26
1
answer

React Redux initState

It is common when you work with redux to define an initial state, eg const initState = { pagInicial:1, pagAtual:1, maxLinks:2, maxReg:5 } So far so good. Now and when I need an initial state, starting with some parameters...
asked by 30.11.2017 / 03:45
0
answers

How do you expect a saga to finish running the whole cycle to perform a next function?

Good afternoon, I have a question regarding the use of sagas. I have a button that when clicked, triggers a function that calls an action: onClickChainIdentifier = (event) => { //action disparada this.props.getChains();...
asked by 17.12.2018 / 21:10
1
answer

Persist currentbase firebase with React Native

This function is triggered by clicking the Login button: export const loginUser = ({ email, password }) => { return (dispatch) => { dispatch({ type: LOGIN_USER }); firebase.auth().setPersistence(firebase.auth.Auth.Persistence.LOCA...
asked by 27.09.2018 / 00:19
1
answer

How to remove an item dynamically from an object?

I'm using a reducer state, which contains an object in this format: x = {10: {nome: 'lucas'}, 20:{nome: 'beraldo'}} <br/> And, I get an id via action. I would like to do something like array.filter , or delete o...
asked by 27.07.2018 / 00:46
0
answers

Delete child node in firebase with react-native and redux

Does anyone know how to delete an item from a ListView in react-native using firebase as a database? In case I want to delete only the item marked in the print below:     
asked by 22.06.2018 / 03:02