You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’d like to clarify the role of the item-level type in registry-item.json.
From my understanding:
File-level type (inside the files array) controls placement and behavior. For example, registry:page files go into the app/.../page.tsx path, registry:hook files go into the hooks directory, etc.
Item-level type (e.g. registry:block, registry:component, etc.) seems to serve only as a label or classification for the whole item, and does not actually affect where the files are placed.
However, the documentation could be read as if the item-level type determines placement as well.
Question
Can you confirm if the following understanding is correct?
Item-level type is purely a label and does not influence file placement.
Placement is determined entirely by the file-level type (and target).
If this is correct, it might help to explicitly clarify this distinction in the docs to avoid confusion.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I’d like to clarify the role of the item-level
type
inregistry-item.json
.From my understanding:
type
(inside thefiles
array) controls placement and behavior. For example,registry:page
files go into theapp/.../page.tsx
path,registry:hook
files go into the hooks directory, etc.type
(e.g.registry:block
,registry:component
, etc.) seems to serve only as a label or classification for the whole item, and does not actually affect where the files are placed.However, the documentation could be read as if the item-level
type
determines placement as well.Question
Can you confirm if the following understanding is correct?
type
is purely a label and does not influence file placement.type
(andtarget
).If this is correct, it might help to explicitly clarify this distinction in the docs to avoid confusion.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions