Warning: Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks #341
-
Hi, I'm getting this warning when using an extraAction. I have this simple function:
which I import and apply as an extraAction:
I'm sure it's something silly, I just can't figure it out. I'd be grateful for your tips 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @robojiannis :) |
Beta Was this translation helpful? Give feedback.
Hi @robojiannis :)
Effectively, you can't use the hooks inside a callback, like the actions one.
The good news is that within the params that the callback receives there is a
context
object that includes all the controllers of the CMS, so you can access the storage source from there.Hope this helps!