Learning on Web Dev Open is free for all.

Framework Internals > Components as contractsThe prop that should have been children
Phase 04Components as contracts194 of 434

The prop that should have been children

Take a component with nine props, find the three that are really slots, and cut the surface in half without losing a feature.

Build40 minAI implements

Build this in your own editor

This one runs on your machine rather than in the browser workbench. Work to the outcomes below, then come back and mark it complete.

You should now be able to

  • Refactor a configuration-heavy component into a composable one
  • Keep every existing call site working through the change
Ask the community

Loading…