Ok, I’ve doing a Gutenberg Block for culinary blog. A block have a ingredient’s table and something information. A block put in in each post (recepie). A block is similar with a design in Figma. It’s ok. But I can to do it with CPT. I want to ask only my block about. So, what is correctly?
You can do whatever makes the most sense to you. There’s not really a right or wrong as long as it works.
CPTs can contain multiple blocks, or not. They can also have taxonomy terms assigned to them to help better organize them. Since we can nest blocks, blocks too can contain multiple other blocks, and they can also have related meta data associated with them, similar to how CPTs can have custom fields. However blocks cannot have taxonomy terms associated with them, taxonomies are solely for the realm of posts and CPTs.
There are other similarities and differences as well. Generally speaking, CPTs are more macro in scale than blocks, Blocks are more micro scale than CPTs. But there’s a lot of overlap, it’s likely you can make either one work for a specific situation. You still should decide upon the ideal schema for your situation because once you’ve generated a lot of content under a particular schema, it’s difficult to go back and implement a different schema.
It’s generally easier and faster to query for a particular CPT, than to query for a particular block. If I were to create a culinary blog, I’d use a CPT for the various dishes. Each would contain various blocks for the different elements such as description, ingredients, instructions, nutritional data, etc. That’s what I’d do. You should do you 🙂