Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs) Remove extra style tag curly braces #10973

Merged
merged 1 commit into from
Sep 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ Each of these changes will continue to work as before with a new warning until t
### New helpful warnings

- If you use a minified copy of the _development_ build, React DOM kindly encourages you to use the faster production build instead. ([@sophiebits](https://github.com/sophiebits) in [#5083](https://github.com/facebook/react/pull/5083))
- React DOM: When specifying a unit-less CSS value as a string, a future version will not add `px` automatically. This version now warns in this case (ex: writing `style={{'{{'}}width: '300'}}`. Unitless *number* values like `width: 300` are unchanged. ([@pluma](https://github.com/pluma) in [#5140](https://github.com/facebook/react/pull/5140))
- React DOM: When specifying a unit-less CSS value as a string, a future version will not add `px` automatically. This version now warns in this case (ex: writing `style={{width: '300'}}`. Unitless *number* values like `width: 300` are unchanged. ([@pluma](https://github.com/pluma) in [#5140](https://github.com/facebook/react/pull/5140))
- Synthetic Events will now warn when setting and accessing properties (which will not get cleared appropriately), as well as warn on access after an event has been returned to the pool. ([@kentcdodds](https://github.com/kentcdodds) in [#5940](https://github.com/facebook/react/pull/5940) and [@koba04](https://github.com/koba04) in [#5947](https://github.com/facebook/react/pull/5947))
- Elements will now warn when attempting to read `ref` and `key` from the props. ([@prometheansacrifice](https://github.com/prometheansacrifice) in [#5744](https://github.com/facebook/react/pull/5744))
- React will now warn if you pass a different `props` object to `super()` in the constructor. ([@prometheansacrifice](https://github.com/prometheansacrifice) in [#5346](https://github.com/facebook/react/pull/5346))
Expand Down
2 changes: 1 addition & 1 deletion docs/_posts/2016-03-07-react-v15-rc1.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Each of these changes will continue to work as before with a new warning until t
### New helpful warnings

- If you use a minified copy of the _development_ build, React DOM kindly encourages you to use the faster production build instead.
- React DOM: When specifying a unit-less CSS value as a string, a future version will not add `px` automatically. This version now warns in this case (ex: writing `style={{'{{'}}width: '300'}}`. (Unitless *number* values like `width: 300` are unchanged.)
- React DOM: When specifying a unit-less CSS value as a string, a future version will not add `px` automatically. This version now warns in this case (ex: writing `style={{width: '300'}}`. (Unitless *number* values like `width: 300` are unchanged.)
- Synthetic Events will now warn when setting and accessing properties (which will not get cleared appropriately), as well as warn on access after an event has been returned to the pool.
- Elements will now warn when attempting to read `ref` and `key` from the props.
- React DOM now attempts to warn for mistyped event handlers on DOM elements (ex: `onclick` which should be `onClick`)
Expand Down
2 changes: 1 addition & 1 deletion docs/_posts/2016-04-07-react-v15.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Each of these changes will continue to work as before with a new warning until t
- If you use a minified copy of the _development_ build, React DOM kindly encourages you to use the faster production build instead.
<small>[@sophiebits](https://github.com/sophiebits) in [#5083](https://github.com/facebook/react/pull/5083)</small>

- React DOM: When specifying a unit-less CSS value as a string, a future version will not add `px` automatically. This version now warns in this case (ex: writing `style={{'{{'}}width: '300'}}`. Unitless *number* values like `width: 300` are unchanged.
- React DOM: When specifying a unit-less CSS value as a string, a future version will not add `px` automatically. This version now warns in this case (ex: writing `style={{width: '300'}}`. Unitless *number* values like `width: 300` are unchanged.
<small>[@pluma](https://github.com/pluma) in [#5140](https://github.com/facebook/react/pull/5140)</small>

- Synthetic Events will now warn when setting and accessing properties (which will not get cleared appropriately), as well as warn on access after an event has been returned to the pool.
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/context.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Suppose you have a structure like:
class Button extends React.Component {
render() {
return (
<button style={{'{{'}}background: this.props.color}}>
<button style={{background: this.props.color}}>
{this.props.children}
</button>
);
Expand Down Expand Up @@ -72,7 +72,7 @@ import PropTypes from 'prop-types';
class Button extends React.Component {
render() {
return (
<button style={{'{{'}}background: this.context.color}}>
<button style={{background: this.context.color}}>
{this.props.children}
</button>
);
Expand Down Expand Up @@ -166,7 +166,7 @@ Stateless functional components are also able to reference `context` if `context
import PropTypes from 'prop-types';

const Button = ({children}, context) =>
<button style={{'{{'}}background: context.color}}>
<button style={{background: context.color}}>
{children}
</button>;

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/reconciliation.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ By comparing these two elements, React knows to only modify the `className` on t
When updating `style`, React also knows to update only the properties that changed. For example:

```xml
<div style={{'{{'}}color: 'red', fontWeight: 'bold'}} />
<div style={{color: 'red', fontWeight: 'bold'}} />

<div style={{'{{'}}color: 'green', fontWeight: 'bold'}} />
<div style={{color: 'green', fontWeight: 'bold'}} />
```

When converting between these two elements, React knows to only modify the `color` style, not the `fontWeight`.
Expand Down