Skip to content

Tag: state

handling mutliple inputs using redux

I have react hooks section in which user can edit input fields, there are hundreds of inputs that is why I need to use redux (newbie to redux though), Live demo on codesandbox: demo so far I have this and here is setting js where I have input fields Expected results: Just when the user types in inputs eg firs…

Set initial class variable from axios request in React

When i call this function it updates the array questions in state and array initialQuestions variable in constructor. The state questions represents the values form inputs. The inputs are handled in child component with this code setQuestions is passed in props as setQuestions={(state) => this.setState({ q…

Mutate Vuex array passed in the payload

What’s the technical difference between next two approaches? Example is trivial but when I have huge nested objects, I need to pass lots of IDs in order to find desired object inside the mutation. In second example I pass an array and just mutate it. Again, technically in both examples we invoke the sam…