Skip to content

Commit

Permalink
Merge pull request vasanthk#102 from ayush000/master
Browse files Browse the repository at this point in the history
Update react documentation links
  • Loading branch information
vasanthk authored Jul 11, 2018
2 parents 66d759b + f948085 commit fdcf295
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions anti-patterns/02.findDOMNode.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Use callback refs over findDOMNode()

Note:
React also supports using a string (instead of a callback) as a ref prop on any component, although this approach is mostly legacy at this point.
- [More about refs](https://facebook.github.io/react/docs/more-about-refs.html)
- [More about refs](https://reactjs.org/docs/refs-and-the-dom.html)
- [Why ref-string is legacy?](http://stackoverflow.com/questions/37468913/why-ref-string-is-legacy)

##### findDOMNode(this)
Expand Down Expand Up @@ -117,4 +117,4 @@ class MyComponent extends Component {

### Related links:
- [ESLint Rule proposal: warn against using findDOMNode()](https://github.com/yannickcr/eslint-plugin-react/issues/678#issue-165177220)
- [Refs and the DOM](https://facebook.github.io/react/docs/refs-and-the-dom.html)
- [Refs and the DOM](https://reactjs.org/docs/refs-and-the-dom.html)
2 changes: 1 addition & 1 deletion anti-patterns/03.mixins.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ var FirstView = bindToCarData(React.createClass({

### Related links:
- [Mixins are dead - Long live higher ordercomponents](https://medium.com/@dan_abramov/mixins-are-dead-long-live-higher-order-components-94a0d2f9e750)
- [Mixins are considered harmful](https://facebook.github.io/react/blog/2016/07/13/mixins-considered-harmful.html)
- [Mixins are considered harmful](https://reactjs.org/blog/2016/07/13/mixins-considered-harmful.html)
- [Stackoverflow: Using mixins vs components for code reuse](http://stackoverflow.com/questions/21854938/using-mixins-vs-components-for-code-reuse-in-facebook-react)
- [Stackoverflow: Composition instead of mixins in React](http://stackoverflow.com/questions/30845561/how-to-solve-this-using-composition-instead-of-mixins-in-react)
2 changes: 1 addition & 1 deletion anti-patterns/06.using-indexes-as-key.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ Assuming `todo.id` is unique to this list and stable, React would be able to reo
```

### @Reference:
- [React docs](https://facebook.github.io/react/docs/reconciliation.html#tradeoffs)
- [React docs](https://reactjs.org/docs/reconciliation.html#tradeoffs)
- [Lin Clark's code cartoon](https://youtu.be/-t8eOoRsJ7M?t=981)
2 changes: 1 addition & 1 deletion anti-patterns/07.spreading-props-dom.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const Spread = ({ flag, ...domProps }) => (<div {...domProps}>Test</div>);

*Note*

In [scenarios](https://github.com/vasanthk/react-bits/issues/34) where you use a [PureComponent](../perf-tips/02.pure-component.md), when an update happens it re-renders the component even if `domProps` did not change. This is because PureComponent only [shallowly compares](https://facebook.github.io/react/docs/react-api.html#react.purecomponent) the objects.
In [scenarios](https://github.com/vasanthk/react-bits/issues/34) where you use a [PureComponent](../perf-tips/02.pure-component.md), when an update happens it re-renders the component even if `domProps` did not change. This is because PureComponent only [shallowly compares](https://reactjs.org/docs/react-api.html#reactpurecomponent) the objects.

### Related links:
- [React Design Patterns and best practices by Michele Bertoli.](https://github.com/MicheleBertoli/react-design-patterns-and-best-practices)
Expand Down
2 changes: 1 addition & 1 deletion patterns/18.conditionals-in-jsx.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,6 @@ const sampleComponent = () => {

### Related links:
- https://engineering.musefind.com/our-best-practices-for-writing-react-components-dec3eb5c3fc8
- [Conditional rendering](https://facebook.github.io/react/docs/conditional-rendering.html)
- [Conditional rendering](https://reactjs.org/docs/conditional-rendering.html)


2 changes: 1 addition & 1 deletion patterns/19.async-nature-of-setState.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class TestComponent extends React.Component {
// However, we are not adding the event the `React way` - this will have
// effects on how state mutates
//
// Check the list here - https://facebook.github.io/react/docs/events.html
// Check the list here - https://reactjs.org/docs/events.html
this._btnRef.addEventListener('mouseleave', this._onMouseLeaveHandler);

// Add JS timeout
Expand Down
2 changes: 1 addition & 1 deletion perf-tips/02.pure-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ export default class Example extends PureComponent {
### Related links:
- [Recompose](https://github.com/acdlite/recompose#composition)
- [Higher Order Components with Functional Patterns Using Recompose](https://egghead.io/courses/higher-order-components-with-functional-patterns-using-recompose)
- [React: PureComponent](https://facebook.github.io/react/docs/react-api.html#react.purecomponent)
- [React: PureComponent](https://reactjs.org/docs/react-api.html#reactpurecomponent)
- [Pure Components](https://www.fullstackreact.com/30-days-of-react/day-11/)
- [Top 5 Recompose HOCs](https://medium.com/@abhiaiyer/top-5-recompose-hocs-1a4c9cc4566)
2 changes: 1 addition & 1 deletion perf-tips/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

## Articles

[Optimizing Performance: Docs](https://facebook.github.io/react/docs/optimizing-performance.html)
[Optimizing Performance: Docs](https://reactjs.org/docs/optimizing-performance.html)

[Performance Engineering with React](http://benchling.engineering/performance-engineering-with-react/)

Expand Down

0 comments on commit fdcf295

Please sign in to comment.