@samitouri / QOS-React-2 / commits / 7aa621daee

Fix typo in more-about-refs.md (#7933)

Colin Wren committed Oct 11, 2016 at 03:56 UTC 7aa621daeeac103fc7e86e713e0dcd48cfac9819
1 file changed +1 -1
docs/docs/08.1-more-about-refs.md
+1 -1
@@ -138,6 +138,6 @@ Refs are a great way to send a message to a particular child instance in a way t
138 ### Cautions:
139
140 - *Never* access refs inside of any component's render method – or while any component's render method is even running anywhere in the call stack.
141 -- If you want to preserve Google Closure Compiler advanced-mode crushing resilience, make sure to never access as a property what was specified as a string. This means you must access using `this.refs['myRefString']` if your ref was defined as `ref="myRefString"`.
141 +- If you want to preserve Google Closure Compiler advanced-mode crushing resilience, make sure to never access as a property that was specified as a string. This means you must access using `this.refs['myRefString']` if your ref was defined as `ref="myRefString"`.
142 - If you have not programmed several apps with React, your first inclination is usually going to be to try to use refs to "make things happen" in your app. If this is the case, take a moment and think more critically about where state should be owned in the component hierarchy. Often, it becomes clear that the proper place to "own" that state is at a higher level in the hierarchy. Placing the state there often eliminates any desire to use `ref`s to "make things happen" – instead, the data flow will usually accomplish your goal.
143 - Refs may not be attached to a [stateless function](/react/docs/reusable-components.html#stateless-functions), because the component does not have a backing instance. You can always wrap a stateless component in a standard composite component and attach a ref to the composite component.