Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Exposing group and block types when generating types

default discord avatar
_sadajo_2 years ago
2

I want to write some generic mappings that maps from payload's types to props for my frontend React components. Blocks and groups aren't exposed at the top level, so I'm having to manually pick them out by unpacking arrays and extracting specific blocks.



Is it possible to expose these when generating types? Or is there a simpler way for me to define these types based on the generated typings?

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.