Skip to content

Why are the parameters for collection hooks typed as being possibly undefined? #252

Answered by jmikrut
richardvanbergen asked this question in Q&A
Discussion options

You must be logged in to vote

A lot of good questions in here. First up, I have no idea why args was set to being optional. We just deployed 0.9.3, which makes args required. That will simplify some of your logic.

Also, you don't need to return data from collection hooks, global hooks, or field hooks. If you don't return data, Payload will fall back on the default incoming data.

Does this answer your questions?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@richardvanbergen
Comment options

Answer selected by richardvanbergen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants