Questions tagged [react-thunk]

65 questions
0
votes
2 answers

React server side rendering using data called from API

I use react-redux + thunk + redial and generate my HTML on server side. I want to generate meta tags using user data coming from another server by react-helmet. in my server: import { trigger } from 'redial'; trigger('fetch', components, locals) …
alireza
  • 398
  • 3
  • 12
0
votes
1 answer

passing argument to method that updates store in react-redux

I want a user be able to input text into an input box and based on this would like to search an api. I am using redux and redux-thunk. I am unsure how I should pass the text that is inputted as an argument to the API call. If I wasn't using redux…
user6002037
0
votes
1 answer

receive data from react object, using redux

I'm trying to parse a json received from external api. My reducer is: import { RECEIVED_FORECAST } from '../actions/index'; export default function ForecastReducer (state = [], action) { switch (action.type) { case RECEIVED_FORECAST: return …
Olenka
  • 249
  • 3
  • 11
-1
votes
1 answer

React Redux - undefined is not an object evaluating this.props.navigation.navigate

I am new to Redux and I don't understand what is wrong with the following set up. I got error: TypeError: TypeError: undefined is not an object (evaluating 'this.props.navigation.navigate') For actions, I have a function for login: export const…
JAM
  • 565
  • 2
  • 9
  • 22
-1
votes
1 answer

JSX not updating to binded State after await

I have a login form, which loads a loader when logging in. When login is unsucesful the loader should disappear and the buttons should reappear. The loader is binded to this.state.loading. if !this.state.loading it should show buttons (works on…
michael
  • 6,405
  • 14
  • 52
  • 98
1 2 3 4
5