Update docs with reactStrictMode in render#1479
Update docs with reactStrictMode in render#1479eps1lon merged 3 commits intotesting-library:mainfrom
reactStrictMode in render#1479Conversation
✅ Deploy Preview for testing-library ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
| - [`initialProps`](#initialprops) | ||
| - [`onCaughtError`](#oncaughterror) | ||
| - [`onRecoverableError`](#onrecoverableerror) | ||
| - [`wrapper`](#wrapper-1) |
There was a problem hiding this comment.
This link was wrong
| Custom queries can also be added globally by following the | ||
| [custom render guide](setup.mdx#custom-render). | ||
|
|
||
| ### `render` Options `reactStrictMode` |
There was a problem hiding this comment.
| ### `render` Options `reactStrictMode` | |
| ### `reactStrictMode` |
Isn't this redundant? Also don't forget to update the anchor if you accept the change.
There was a problem hiding this comment.
Naming it only reactStrictMode would conflict with reactStrictMode from configure because they would share the same hash. If you prefer another name, let me know.
There was a problem hiding this comment.
It's nested below "render Options" already so there shouldn't be a conflict. Or do you mean the anchors conflict? Can we decouple the anchor ID from the heading name?
This just seems noisy at the moment:
- render Options
- container
- baseElement
- [...]
- render Options reactStrictMode
There was a problem hiding this comment.
do you mean the anchors conflict?
Exactly.
Can we decouple the anchor ID from the heading name?
It seems auto-generated. How would you suggest we do that?
This just seems noisy at the moment:
Yeah, I agree, but I was following the same pattern as renderHook Options wrapper.
Happy to change, but I'm not sure if there's an easy solution.
There was a problem hiding this comment.
Then let's keep it for now. Could even argue the repeated context is good on nested list with lots of siblings since it reduces cognitive overhead.
eps1lon
left a comment
There was a problem hiding this comment.
I'd also cross reference this option from configure#reactStrictMode to help discoverability.
Done. Let me know if wording is fine or if there's any suggestion for improvement. |
Update docs with
reactStrictModeinrender, introduced in testing-library/react-testing-library#1390.