Running before unmount on server components??
is there a way to wrap a react server component in a function that passes props to it and call something after component is dismounted or something? I know in client components I can make use of useEffect to call stuff before component is dismounted, but not sure how to do the same for server components.
what we basically want to do is:
1. create instance of a thing
2. make it available to the component (could be a hook or props , doesn't matter)
3. make sure that the thing executes a function before the component unmounts
what we basically want to do is:
1. create instance of a thing
2. make it available to the component (could be a hook or props , doesn't matter)
3. make sure that the thing executes a function before the component unmounts
