microcosm
microcosm copied to clipboard
Docs gaps and common pitfalls
@nhunzaker and I were talking earlier about common problems (maybe we need a common gotchas/mistakes/whatever section) and about internal documentation.
If anyone has any common problems, gaps in documentation, or hidden documentation that we aren't exposing at a top level (ie. the site, the top level README) then comment here.
Doc Gaps and Errors in Site:
- [x]
addEffect()
code sample is wrong - [ ] The difference between
patch
andreset
is not clear. Need an example input/output for those to illustrate the difference. - [ ] Document the
register
method of Domains and Effects in theArchitecture
section or inOverview
section forAPI
(see conversation on #275)
Common Pitfalls (need a section for these):
- [ ] Create a "Common Pitfalls/FAQ" section in the docs (where?)
- [ ] People forget to close out actions
- [ ] People don't register actions correctly (typos)
- [ ] People don't register action handlers correctly (typos)
https://github.com/vigetlabs/microcosm/blob/master/docs/api/microcosm.md#addeffectconfig-options has a code example that is adding a domain.
The difference between patch
and reset
is not clear to me. Is it possible to show an example input/output for those to illustrate the difference?
We just hit another one. withSend
wraps components, which can be confusing when using Enzyme's shallow rendering.