Commit Graph

51 Commits

Author SHA1 Message Date
Dan Abramov
2d56ee4b57 Merge pull request #5731 from MatthewHerbst/docs-arrayof-custom-validator
Documentation for arrayOf custom item validator
2016-04-02 14:12:23 +01:00
Matthew Herbst
5693f30959 Added new documentation showing use of a custom validator for arrayOf or objectOf, specifically how the method signature for such a validator differs from the customProp validator method signature. Made minor edits to error message for customProp example to match error messages found in src. 2016-04-02 19:28:25 +08:00
Mark Funk
00e1fe2b6a Update ES6 class documentation with binding perf
Adding a note in the ES6 class documentation about function binding.  Recommending that you bind your handlers in the constructor so that they are referentially the same function every time render is invoked (helps with child components that might potentially call shouldComponentUpdate)
2016-03-29 12:51:57 -07:00
Rajat Sehgal
8a03d1988d Use const instead of var (ES6 best practices) 2016-01-29 00:47:43 -05:00
Ken Powers
d71dbb9e98 Clarify stateless function component optimizations.
As discussed on Discord.
2016-01-19 16:46:00 -05:00
iamchenxin
2877e4305e Update zh-docs with 7e2a7f0 2015-12-23 00:54:48 +08:00
Vitor Balocco
4517ae4fde Clarify usage of .propTypes and .defaultProps when using stateless functional components
I've seen some people unaware about the fact that you can still specify `.propTypes` and `.defaultProps` when you are defining a functional component by setting them as properties of the function.
I thought clarifying this in the docs could help!
2015-12-10 23:21:59 +01:00
Stefan Dombrowski
4a80d994d4 [docs] Single Child
* Single Child belongs to Prop Validation, so it was moved there.
* "throw" was changed to "warn".
2015-11-25 17:34:40 +01:00
Baraa Hamodi
a38a848170 Documentation cleanup. 2015-10-12 15:33:32 -04:00
Baraa Hamodi
bd6d713917 File Cleanup. 2015-10-10 16:05:58 -04:00
Matt Brookes
1525251178 Grammar
I'm assuming this was meant to say that the JSX spread syntax saves typing, not copying attributes.
2015-10-09 14:31:59 +01:00
Jim
33cd980f0e React -> ReactDOM for render() and findDOMNode() 2015-10-05 17:46:58 -07:00
Jim
c426902fca Added documentation for stateless components, condensed the two pages about refs into a single page. 2015-09-30 18:54:19 -07:00
Tsung Hung
04fac68f10 updated some typos, grammers, and made sentences sound better 2015-05-04 16:26:14 -07:00
Reed Loden
dd010b34e2 SSL/TLSize all the things! (convert http:// to https:// where appropriate)
Update links to use https:// where it is supported. There's probably a lot
more that could be fixed, but these are the core ones I found (especially
the download links in order to prevent MITM attacks). Note that there are
some fb.me links that will redirect to http:// even while accessed over
https://, but this seemed like the best way to fix those for now.

NOTE: Only non-third-party files were modified. There are references to
http:// URLs in vendored/third-party files, but seems appropriate to fix
upstream for those rather than editing the files.

Also, copy one image locally to the blog, as it was hotlinking to a site
that did not support https://.

Last, use youtube-nocookie.com instead of youtube.com for video embeds,
as the former doesn't try to set a cookie on load (privacy enhancement).
2015-04-18 16:49:32 -07:00
Gareth Nicholson
26d6df1d77 clarify sentence 2015-04-09 12:16:21 +02:00
iamdoron
e5a304ff1d use 'forEach' instead of 'map' when clearing intervals 2015-04-02 14:06:08 +03:00
Alex Lopatin
3524427e54 Docs: Clarify that React.PropTypes.node accepts fragments
As of #3293 `ReactFragment` counts as a node, but this isn't made clear in the docs.
2015-03-25 17:17:42 -07:00
Julian Viereck
c72d79879c Fix small typo 2015-03-16 18:27:04 +01:00
Ben Alpert
e60e8db043 with the exception for -> with the exception of 2015-03-10 14:44:44 -07:00
Sebastian Markbage
ea4dd85a7e ES6 Class Docs
Some minor burried docs.
2015-03-10 14:41:42 -07:00
Raymond Ha
2f51451165 Update deprecated propTypes 2014-10-29 21:00:32 -07:00
Sebastian Markbage
4202fcd9c5 Replace transferPropsTo with transferring props patterns 2014-10-28 11:06:30 -07:00
Ben Alpert
fb46ad0356 Update docs to align with 0.12 better
- Rename React.renderComponent -> React.render
- Remove most references to transferPropsTo
2014-10-22 14:01:54 -07:00
Cheng Lou
33c7ee6112 [Docs] Remove most of @jsx
I kept some places intact (search for @jsx) because they require other bigger changes:

- ref-01-top-level-api.md
- grunt/tasks/npm.js
- old blog posts (don't change those)
- examples/ folder, as they have their own package.json that rely on old dependencies (node-jsx, reactify) that haven't upgraded to 0.12
2014-10-20 14:44:07 -04:00
Ben Foxall
f3fb21afc0 Less -> Fewer
bugs and bytes are countable, so should be fewer
2014-09-11 14:33:16 +01:00
Lee Byron
fd1040b663 Merge pull request #1601 from gaearon/apply-component-and-mixin-spec-deterministically
Apply component and mixins specs deterministically
2014-08-15 18:08:03 -07:00
Paul O’Shannessy
2865e4a1c8 Set default layout for docs 2014-08-13 11:40:14 -07:00
Ben Alpert
bdcb265904 [docs] Add parens to defeat ASI in example
Fixes #1996.
2014-08-04 21:48:24 -07:00
Mathieu M-Gosselin
7c277b1f8c Added example of objectOf usage in documentation. 2014-06-17 23:43:25 -04:00
Dan Abramov
6b97ac8811 Apply component and mixins specs deterministically
Fixes #1589.
2014-05-26 02:56:28 +04:00
Cheng Lou
ff6cb41f09 [Docs] new PropType behavior
(Killed the TODOs since they're no longer valid).
2014-04-11 17:40:04 -07:00
Felix Kling
bf4966f729 Update 05-reusable-components.md
`any` also seems to accept primitive values, not only objects. And since we already have `React.PropType.object`, the description was confusing.
2014-04-08 15:43:24 -07:00
Ben Alpert
0912eabca4 Tweak propTypes examples for clarity in oneOfType 2014-02-26 15:03:47 -08:00
Ben Alpert
a401800549 Add missing commas in propTypes docs 2014-02-13 23:19:41 -08:00
Ben Alpert
12a33fad6f Add docs for new prop types 2014-02-13 22:59:48 -08:00
cpojer
5989a938d3 Add PropTypes.ArrayOf and clean up ReactPropTypes.js 2014-02-06 11:28:51 -08:00
Bob Eagan
c54d5a06f7 add hash link for lifecycle section of working with the browser page 2014-01-24 16:46:09 -07:00
Bob Eagan
c084776ff7 fix incorrect link 2014-01-24 11:10:16 -07:00
cpojer
808dea5c08 Update propTypes documentation. 2014-01-21 16:45:34 -08:00
cpojer
55d7adbc5b Document PropTypes.renderable and PropTypes.component 2014-01-10 09:36:22 -08:00
Cheng Lou
0767e7b9dd docs make all link start with /react/docs 2013-12-19 17:15:01 -05:00
Jamie Wong
84c0556123 s/pased/passed 2013-07-19 18:48:46 -04:00
Ben Alpert
37d37c6592 One-character typo fix 2013-07-19 10:55:31 -07:00
Paul O’Shannessy
076d8fc5a8 [docs] Prop validation + cleanup default props 2013-07-17 09:47:09 -07:00
Paul O’Shannessy
d124dd6440 [docs] Remove @benjamn's TODO for testing 2013-07-17 09:12:26 -07:00
Paul O’Shannessy
ba1db591d9 Write Default Props section 2013-07-17 09:12:02 -07:00
Paul O’Shannessy
8687f36982 Cleanup "Reusable Components" 2013-07-16 23:29:14 -07:00
Paul O’Shannessy
f2345ba2e2 Remove numbers from URLs.
This will let us keep docs in order on the filesystem but have
reasonable permalinks. If we add something at 02- it doesn't result in
lots of broken links.
2013-07-16 17:09:43 -07:00
Paul O’Shannessy
17ea30c8c5 Fix title casing and heading levels 2013-07-16 14:52:57 -07:00