Skip to content

Tag: reactjs

When do I must use the spread operator in useReducer?

I’ve noticed that in many useReducer examples, the spread operator is used in the reducer like this: However in many of my practices, I removed …state and had no issues at all. I understand that …state is used to preserve the state of the remaining states, but would a reducer preserve those …

How to time duration calculate in react js

I want to calculate the time duration with the current time and another time. In my problem the current time and all ready time in data base time format are different, this format is given format: 2020-11-07 , 22:52 but now time format is 30/10/2020 , 20:50:34 . So I have a problem with this diffrent format. …

customise color picker with out any package in react

picture here is the design can we able to implement color picker like this without any packages in react is it possible to customize a color picker like the above image with react(without any package)? I tried a lot, but cannot able to find the proper solution. if anyone can help thanks in advance. click this…