Skip to main content

All Questions

0 votes
0 answers
41 views

DOM update incomplete in D3 when used with React

I have a problem updating the DOM elements in D3 in a React Component. I have a component which gets data from a Slider in the main App. The slider filters the data, removing or adding elements. When ...
Andrew Richardson's user avatar
3 votes
6 answers
2k views

When to use functional update form of useState() hook, eg. setX(x=>x+1)

Normally when we need to update a state in a functional component, we do something like this: function Example() { const [count, setCount] = React.useState(0); return (<div><p>You ...
Chong Lip Phang's user avatar
2 votes
2 answers
1k views

React Lifting State Up

I was studying this part of React documentation: https://reactjs.org/docs/lifting-state-up.html. I have a similar problem in a project of mine, but with a slight difference. We can use the same ...
Davi Alefe's user avatar
1 vote
0 answers
19 views

How update and remove redux state reducer

When I move a user I would like to update new group the reducer and remove user in old groups /mystate // groups: [ // { // users: [ // '1A', // '1B' // ], // id: '2', // ...
codecodecarlos's user avatar
1 vote
0 answers
96 views

D3js: How to update children inside <g> when using brush selection?

I'm trying to modify a dataviz layout in order to group a rect and a a below a g element. Display works, but when I updated my brush selection everything go to hell as event that should be remove from ...
Édouard Lopez's user avatar
1 vote
3 answers
875 views

Warning of Do not mutate state directly. Use setState() in reactjs

I'm new to reactjs here is the code in which i want to update the states by using the "=" sign because when i try to update state by using setState method it gives error as I need to update an object ...
Jawad Rafiq's user avatar
0 votes
0 answers
68 views

Migration to material ui v.4 x x problem with css

i have a difficult task of migrating the material ui version from 0.20 to 4.9.0 (the latest). I've changed all the imports and changes of components but i have a MAJOR problem with the css. We use a ...
RamAlx's user avatar
  • 7,284
1 vote
1 answer
1k views

How to update React Google Map after receive data from server

How to update ReactGoogleMap after receiving data from the server? This is how I create Google Map using react-google-maps API. import React from "react" import { compose, withProps } from "...
phoon's user avatar
  • 369
0 votes
1 answer
306 views

How to update webpage based on selection from dropdown list?

I have a webpage that is displaying a list of movies from an API. As you can see in my code, right under the render method I have three commented out sort methods that works fine, when I uncomment one ...
Christian Lopez's user avatar