Michael O'Brien
f665a4b48a
Update comment to refer to correct method name ( #7873 )
8 years ago
Kateryna
976ca17896
Fix initial state example for Recat.createClass ( #7867 )
In the example there was a typo with setting initial state using `getInitialState` method
8 years ago
Marcelo Alves
636bc1114a
Fix minor typo in closing H1 tag ( #7855 )
8 years ago
Rafael Angeline
ca37fb35cb
Reusable Components ES6 Update
9 years ago
Tanase Hagi
7793db16b0
Add propsTypes and defaultProps example for stateless functions ( #7458 )
* Add propsTypes and defaultProps example for stateless functions
* Update 05-reusable-components.md
* Update 05-reusable-components.md
9 years ago
Veljko Tornjanski
ac1bb87249
Wording change in doc ( #7348 )
9 years ago
Daniel Lo Nigro
d457201862
Upgrade to Jekyll 3
Full list of changes is at https://jekyllrb.com/docs/upgrading/2-to-3/ . The tl;dr of it is:
- Relative permalinks were removed, so all the files in the `docs` subdirectory need their permalink to be prefixed with `docs/`
- `post` and `page` types were renamed to `posts` and `pages` respectively
- `jekyll-paginate`, `pygments` and `redcarpet` are all now optional, so I needed to explicitly add it to the Gemfile. Jekyll now uses `rouge` rather than `pygments` for syntax highlighting, but rouge does not support highlighting individual lines (`hl_lines`) so we need to continue using Pygments.
- Layout metadata (eg. `sectionid`) is now on a `layout` variable rather than `page`
Tested the following pages and confirmed that they all work:
- "Docs" link (getting started page): http://127.0.0.1:4000/react/docs/getting-started.html
- Downloads: http://127.0.0.1:4000/react/downloads.html
- Tutorial: http://127.0.0.1:4000/react/docs/tutorial.html
- A few pages under the "docs" subdirectory, to confirm they're working properly:
- http://127.0.0.1:4000/react/docs/addons.html
- http://127.0.0.1:4000/react/docs/why-react.html
- http://127.0.0.1:4000/react/docs/create-fragment.html
- A few tips:
- http://127.0.0.1:4000/react/tips/false-in-jsx.html
- http://127.0.0.1:4000/react/tips/style-props-value-px.html
- Non-English versions of the page:
- http://127.0.0.1:4000/react/docs/getting-started-it-IT.html
- http://127.0.0.1:4000/react/docs/getting-started-ja-JP.html
9 years ago
Samuel Reed
7c4a139e05
Add PropTypes.symbol to reusable components doc ( #7171 )
9 years ago
Brandon Dail
253a28af5e
Clarify purpose of state property in ES6 classes ( #7109 )
9 years ago
Ivan Vergiliev
a9e07a8b3c
Document that stateless functional components can return null in v15
9 years ago
Ivan Vergiliev
6fb4eefcc4
Add documentation about empty functional components
9 years ago
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.
9 years ago
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)
9 years ago
Rajat Sehgal
8a03d1988d
Use const instead of var (ES6 best practices)
9 years ago
Ken Powers
d71dbb9e98
Clarify stateless function component optimizations.
As discussed on Discord.
9 years ago
iamchenxin
2877e4305e
Update zh-docs with 7e2a7f0
9 years ago
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!
9 years ago
Stefan Dombrowski
4a80d994d4
[docs] Single Child
* Single Child belongs to Prop Validation, so it was moved there.
* "throw" was changed to "warn".
9 years ago
Baraa Hamodi
a38a848170
Documentation cleanup.
9 years ago
Baraa Hamodi
bd6d713917
File Cleanup.
9 years ago
Matt Brookes
1525251178
Grammar
I'm assuming this was meant to say that the JSX spread syntax saves typing, not copying attributes.
9 years ago
Jim
33cd980f0e
React -> ReactDOM for render() and findDOMNode()
9 years ago
Jim
c426902fca
Added documentation for stateless components, condensed the two pages about refs into a single page.
9 years ago
Tsung Hung
04fac68f10
updated some typos, grammers, and made sentences sound better
10 years ago
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).
10 years ago
Gareth Nicholson
26d6df1d77
clarify sentence
10 years ago
iamdoron
e5a304ff1d
use 'forEach' instead of 'map' when clearing intervals
10 years ago
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.
10 years ago
Julian Viereck
c72d79879c
Fix small typo
10 years ago
Ben Alpert
e60e8db043
with the exception for -> with the exception of
10 years ago
Sebastian Markbage
ea4dd85a7e
ES6 Class Docs
Some minor burried docs.
10 years ago
Raymond Ha
2f51451165
Update deprecated propTypes
10 years ago
Sebastian Markbage
4202fcd9c5
Replace transferPropsTo with transferring props patterns
10 years ago
Ben Alpert
fb46ad0356
Update docs to align with 0.12 better
- Rename React.renderComponent -> React.render
- Remove most references to transferPropsTo
10 years ago
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
10 years ago
Ben Foxall
f3fb21afc0
Less -> Fewer
bugs and bytes are countable, so should be fewer
10 years ago
Paul O’Shannessy
2865e4a1c8
Set default layout for docs
11 years ago
Ben Alpert
bdcb265904
[docs] Add parens to defeat ASI in example
Fixes #1996 .
11 years ago
Mathieu M-Gosselin
7c277b1f8c
Added example of objectOf usage in documentation.
11 years ago
Dan Abramov
6b97ac8811
Apply component and mixins specs deterministically
Fixes #1589 .
11 years ago
Cheng Lou
ff6cb41f09
[Docs] new PropType behavior
(Killed the TODOs since they're no longer valid).
11 years ago
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.
11 years ago
Ben Alpert
0912eabca4
Tweak propTypes examples for clarity in oneOfType
11 years ago
Ben Alpert
a401800549
Add missing commas in propTypes docs
11 years ago
Ben Alpert
12a33fad6f
Add docs for new prop types
11 years ago
cpojer
5989a938d3
Add PropTypes.ArrayOf and clean up ReactPropTypes.js
11 years ago
Bob Eagan
c54d5a06f7
add hash link for lifecycle section of working with the browser page
11 years ago
Bob Eagan
c084776ff7
fix incorrect link
11 years ago
cpojer
808dea5c08
Update propTypes documentation.
11 years ago
cpojer
55d7adbc5b
Document PropTypes.renderable and PropTypes.component
11 years ago