Relative Content

Tag Archive for javascriptreactjsreact-hooks

useEffect is not executed when changing variable in custom hook [duplicate]

This question already has answers here: Is it possible to share states between components using the useState() hook in React? (8 answers) Closed yesterday. I am trying to create a custom hook which contains a state variable and a function to add a string to the given state variable: const [hiddenStatistics, setHiddenStatistics] = useState<String[]>([“a”, “b”]); […]

useEffect is not executed when changing variable in custom hook [duplicate]

This question already has answers here: Is it possible to share states between components using the useState() hook in React? (8 answers) Closed yesterday. I am trying to create a custom hook which contains a state variable and a function to add a string to the given state variable: const [hiddenStatistics, setHiddenStatistics] = useState<String[]>([“a”, “b”]); […]

useEffect is not executed when changing variable in custom hook [duplicate]

This question already has answers here: Is it possible to share states between components using the useState() hook in React? (8 answers) Closed yesterday. I am trying to create a custom hook which contains a state variable and a function to add a string to the given state variable: const [hiddenStatistics, setHiddenStatistics] = useState<String[]>([“a”, “b”]); […]

useEffect is not executed when changing variable in custom hook [duplicate]

This question already has answers here: Is it possible to share states between components using the useState() hook in React? (8 answers) Closed yesterday. I am trying to create a custom hook which contains a state variable and a function to add a string to the given state variable: const [hiddenStatistics, setHiddenStatistics] = useState<String[]>([“a”, “b”]); […]

useEffect is not executed when changing variable in custom hook [duplicate]

This question already has answers here: Is it possible to share states between components using the useState() hook in React? (8 answers) Closed yesterday. I am trying to create a custom hook which contains a state variable and a function to add a string to the given state variable: const [hiddenStatistics, setHiddenStatistics] = useState<String[]>([“a”, “b”]); […]

useEffect is not executed when changing variable in custom hook [duplicate]

This question already has answers here: Is it possible to share states between components using the useState() hook in React? (8 answers) Closed yesterday. I am trying to create a custom hook which contains a state variable and a function to add a string to the given state variable: const [hiddenStatistics, setHiddenStatistics] = useState<String[]>([“a”, “b”]); […]