docs tips fix small typo and code

https://github.com/facebook/react/pull/623/files#r8604849