mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Fix typos in Shallow Rendering Documentation (#8226)
* Fix typos in Shallow Rendering Documentation
* Fix another occurrence
(cherry picked from commit 2317fcaccb)
This commit is contained in:
@@ -49,9 +49,9 @@ Shallow rendering lets you render a component "one level deep" and assert facts
|
||||
|
||||
Call [`createRenderer()`](#createrenderer) in your tests to create a shallow renderer. You can think of this as a "place" to render the component you're testing, and from which you can extract the component's output.
|
||||
|
||||
[`shadowRenderer.render()`](#shallowrenderer.render) is similar to [`ReactDOM.render()`](/react/docs/react-dom.html#render) but it doesn't require DOM and only renders a single level deep. This means you can test components in isolated from how their children are implemented.
|
||||
[`shallowRenderer.render()`](#shallowrenderer.render) is similar to [`ReactDOM.render()`](/react/docs/react-dom.html#render) but it doesn't require DOM and only renders a single level deep. This means you can test components isolated from how their children are implemented.
|
||||
|
||||
After `shadowRenderer.render()` has been called, you can use [`shallowRenderer.getRenderOutput()`](#shallowrenderer.getrenderoutput) to get the shallowly rendered output.
|
||||
After `shallowRenderer.render()` has been called, you can use [`shallowRenderer.getRenderOutput()`](#shallowrenderer.getrenderoutput) to get the shallowly rendered output.
|
||||
|
||||
You can then begin to assert facts about the output. For example, if your component's render method returns:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user