@theroutingcompany/components 0.0.18-alpha.4 → 0.0.18-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -309,6 +309,16 @@ Two ways we can solve this
309
309
  1. Filter spread props. Reject all non-DOM props using a utility. Note react-aria has a util names `filterDOMProps` despite its name it does not filter DOM props (I think it's a legacy util).
310
310
  2. Be more explicit. Write out all the props to forward and types explicitly.
311
311
 
312
+ ## Configurable Components Should Have Sane Defaults & Not Blow Up Without Props
313
+
314
+ > **Warning**
315
+ > This is a principle we don't always abide by but should!
316
+
317
+ Every component should have enough default props to render without exploding and look normal.
318
+
319
+ - ❌ `<Title>Hi</Title>` without `size` prop raising `Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined`
320
+ - ✅ `<Title>Hi</Hi>` without `size` prop defaults to `size='medium'` and doesn’t blow up.
321
+
312
322
 
313
323
  ## Examples
314
324