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
  • 58,414
  • 16
  • 114
  • 157
Wasteland
  • 4,889
  • 14
  • 45
  • 91

0 Answers0