python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
React Context; useReducer Pattern: Can/Should properties on initialState have functions to update initialState?
I have a custom hook which I am trying to move into the context/reducer pattern:
import { sortDateStrings } from '@/Utils/SortDateStrings'
function useDiscounts ({ data }) {
const [effecti...

Antonio Pavicevac-Ortiz
Votes: 0
Answers: 0
Couldn't create collection in firebase?
I'm trying to create a collection if not exist and uploading img file.
I'm receiving upload image URL and progress to but it is not creating collection named images.
const useStorage = (file) => {
...

Digamber negi
Votes: 0
Answers: 3
custom hook returns wrong value
I made a custom hook as my intersection observer but I'm getting false and true state at the same time and twice!, first false(twice) and second true(twice) why is this happening? why state changes it...
muller
Votes: 0
Answers: 1
Custom hook fires every render
I want to run a callback when a component mounts, but not on each render. Using useEffect and an empty dependency array created warnings. I read on a different thread which I now can't find that this ...
Laurence Summers
Votes: 0
Answers: 1