Skip to content

Tag: redux

How to fetch .json data from URL?

I have problem with fetching data from URL. When I write data inside of a file, app works great, but when I try to call same data from URL, I get error. I made a test with small app where everything was inside of a App.js file, and it worked. But new app is kinda devided in multiple files, and

Connecting actions to store outside a component?

So let’s suppose I have a store, with a redux-thunk middleware in it. I created the store and exported it like this: I can now access it anywhere in my app. But what if I want to dispatch an action from anywhere? I have them declared e.g. in myAction.js: Now I can import them and connect to my store/com…

Use reselect selector with parameters

How do I pass additional parameters to combined selectors? I am trying to • Get data • Filter data • Add custom value to my data set / group data by myValue console.log(myValue) returns undefined Answer Updated: 16 February 2022 New Solution from Reselect 4.1: See detail Updated: 6 March 2021 Solution from Re…