3.0.0
Changed
-
BREAKING:
componentfield renamed toComponent(capital C) to enable React hooks usage in inline components without ESLint warnings -
BREAKING: API structure changed to target-first approach
Before (v2):
slotsApi.insert.into.Description({ component: MyComponent });
After (v3):
slotsApi.Description.insert({ Component: MyComponent });
Benefits:
- Discoverability: Type
slotsApi.to see all available slots, thenslotsApi.[SlotName].to see all actions for that slot - Logical grouping: All methods for a specific slot are in one place
- Discoverability: Type
Added
clearmethod to clear all components from a slot
Migration from v2 to v3
- Replace
slotsApi.insert.into.[SlotName]withslotsApi.[SlotName].insert - Replace
component:withComponent:in all insert calls
Example:
// v2
slotsApi.insert.into.Header({ component: MyComponent });
// v3
slotsApi.Header.insert({ Component: MyComponent });