0

I've found the following snippet in an application. What's the meaning of the double () in this snippet? What effect does it have? It'd seem it's a function that calls function, but why?

useEffect(
    () => () => {
      dispatch(fetchData());
    },
    []
  );

Thanks

isherwood
  • 52,576
  • 15
  • 105
  • 143
Wasteland
  • 4,409
  • 13
  • 37
  • 76

0 Answers0