Skip to content

Commit 7dc299b

Browse files
committed
Related Links - title
1 parent 288de45 commit 7dc299b

30 files changed

+30
-30
lines changed

anti-patterns/01.props-in-initial-state.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ class SampleComponent extends Component {
4141
}
4242
```
4343

44-
### Reference:
44+
### Related links:
4545
- https://medium.com/@justintulk/react-anti-patterns-props-in-initial-state-28687846cc2e

anti-patterns/02.refs-over-findDOMNode.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,5 +115,5 @@ class MyComponent extends Component {
115115
}
116116
```
117117

118-
### Reference:
118+
### Related links:
119119
- [ESLint Rule proposal: warn against using findDOMNode()](https://github.com/yannickcr/eslint-plugin-react/issues/678#issue-165177220)

anti-patterns/03.HOC-over-mixins.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ var FirstView = bindToCarData(React.createClass({
7878
}));
7979
```
8080

81-
### Reference:
81+
### Related links:
8282
- [Mixins are dead - Long live higher ordercomponents](https://medium.com/@dan_abramov/mixins-are-dead-long-live-higher-order-components-94a0d2f9e750)
8383
- [Mixins are considered harmful](https://facebook.github.io/react/blog/2016/07/13/mixins-considered-harmful.html)
8484
- [Stackoverflow: Using mixins vs components for code reuse](http://stackoverflow.com/questions/21854938/using-mixins-vs-components-for-code-reuse-in-facebook-react)

anti-patterns/05.mutating-state.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,5 @@ class SampleComponent extends Component {
6666
}
6767
```
6868

69-
### Reference:
69+
### Related links:
7070
[React Design Patterns and best practices by Michele Bertoli.](https://github.com/MicheleBertoli/react-design-patterns-and-best-practices)

anti-patterns/07.spreading-props-dom.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ const Sample = () => (<Spread flag={true} domProps={{className: "content"}}/>);
1414
const Spread = (props) => (<div {...props.domProps}>Test</div>);
1515
```
1616

17-
### Reference:
17+
### Related links:
1818
- [React Design Patterns and best practices by Michele Bertoli.](https://github.com/MicheleBertoli/react-design-patterns-and-best-practices)

gotchas/01.pure-render-checks.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,6 @@ class Component extends React.Component {
140140
}
141141
```
142142
143-
### Reference:
143+
### Related links:
144144
- https://medium.com/@esamatti/react-js-pure-render-performance-anti-pattern-fb88c101332f
145145
- https://github.com/nfour/js-structures/blob/master/guides/react-anti-patterns.md#pure-render-immutability

gotchas/02.synthetic-events.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ function handleClick(event) {
2121
}
2222
```
2323

24-
### Reference:
24+
### Related links:
2525
- [React/Redux: Best practices & gotchas](https://medium.com/nick-parsons/react-redux-best-practices-gotchas-56cf61c1c415)

patterns/01.stateless-functions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Greeting.contextTypes = {
4949
};
5050
```
5151

52-
### Reference:
52+
### Related links:
5353
- [React Stateless Functional Components](https://medium.com/@housecor/react-stateless-functional-components-nine-wins-you-might-have-overlooked-997b0d933dbc#.uf2v8yt3y)
5454
- [Some Thoughts on Function Components in React](https://medium.com/javascript-inside/some-thoughts-on-function-components-in-react-cb2938686bc7#.yol3kq7gb)
5555
- [Container Components and Stateless Functional Components in React](http://www.zsoltnagy.eu/container-components-and-stateless-functional-components-in-react/)

patterns/02.jsx-spread-attributes.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ const FancyDiv = ({ className, ...props }) => (
5757

5858
Although convenient, spread operators do increase the connascence (complexity or type of coupling) and may make debugging occur at run-time instead of before for the developer and any future maintainers. Also, it is better to use spread operators on props into components and then deconstruct the object instead of blindly passing `props` onto React DOM Elements. This is an [anti-pattern](../anti-patterns/07.spreading-props-dom.md). Passing objects with undetermined contents onto React DOM Elements will increase the likelihood of invalid HTML attributes.
5959

60-
### References:
60+
### Related links:
6161

6262
[JSX Spread Attributes](https://gist.github.com/sebmarkbage/07bbe37bc42b6d4aef81)

patterns/08.render-callback.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,6 @@ class WindowWidth extends React.Component {
7575

7676
Many developers favor Higher Order Components for this type of functionality. It’s a matter of preference.
7777

78-
### Related Links
78+
### Related links:
7979

8080
[Github Gist and conversation](https://gist.github.com/vasanthk/b6988e1904f219c6ca236289caad865d)

patterns/09.children-pass-through.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,5 +156,5 @@ From another point of view having an explicit method like renderTodo makes it ev
156156

157157
**Opinion:** Personally I like renderTodo() function being passed to the component (or) having it inside the component.
158158

159-
### Reference:
159+
### Related links:
160160
[Children types](http://krasimirtsonev.com/blog/article/children-in-jsx)

patterns/17.controlled-uncontrolled-input.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class NameForm extends React.Component {
136136
```
137137
Likewise, `<input type="checkbox">` and `<input type="radio">` support defaultChecked, and `<select>` supports defaultValue.
138138

139-
### Reference:
139+
### Related links:
140140
- Gist: https://gist.github.com/vasanthk/a6bf35857749b09275a339f6fd9469bb
141141
- In depth: https://goshakkk.name/controlled-vs-uncontrolled-inputs-react/
142142
- https://www.sitepoint.com/video-controlled-vs-uncontrolled-components-in-react/

patterns/18.conditionals-in-jsx.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const sampleComponent = () => {
6161
};
6262
```
6363

64-
### Reference:
64+
### Related links:
6565
- https://engineering.musefind.com/our-best-practices-for-writing-react-components-dec3eb5c3fc8
6666

6767

patterns/19.async-nature-of-setState.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,6 @@ ReactComponent.prototype.setState = function(partialState, callback) {
155155

156156
What's actually sync or async are the effects of calling setState in a React application - the reconciliation algorithm, doing the VDOM comparisons and calling render to update the real DOM.
157157

158-
## Reference:
158+
## Related links:
159159
- https://medium.com/@wereHamster/beware-react-setstate-is-asynchronous-ce87ef1a9cf3#.jhdhncws3
160160
- https://www.bennadel.com/blog/2893-setstate-state-mutation-operation-may-be-synchronous-in-reactjs.htm

patterns/20.dependency-injection.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Inject.contextTypes = {
114114
};
115115
```
116116

117-
### Reference:
117+
### Related links:
118118
- [What is Dependency Injection?](https://www.youtube.com/watch?v=IKD2-MAkXyQ)
119119
- [The Basics of Dependency Injection](https://www.youtube.com/watch?v=jXhdOTw1q5Q)
120120
- [Dependency injection in JavaScript](http://krasimirtsonev.com/blog/article/Dependency-injection-in-JavaScript)

patterns/23.flux-pattern.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,5 @@ module.exports = {
8585
};
8686
```
8787

88-
### Reference:
88+
### Related links:
8989
- https://github.com/krasimir/react-in-patterns/tree/master/patterns/flux

patterns/24.one-way-data-flow.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,5 @@ The benefit that comes with this pattern is that our components become dummy rep
6464
It's really easy to think about the React components as views (renderers).
6565
We write our application in a declarative way and deal with the complexity in only one place.
6666

67-
### Reference:
67+
### Related links:
6868
- https://www.startuprocket.com/articles/evolution-toward-one-way-data-flow-a-quick-introduction-to-redux

patterns/25.presentational-vs-container.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export default function (Component) {
129129
Using this technique our container is really flexible in rendering its result.
130130
It will be really helpful if we want to switch from digital to analog clock representation.
131131

132-
### Reference:
132+
### Related links:
133133
- https://medium.com/@dan_abramov/smart-and-dumb-components-7ca2f9a7c7d0#.mbglcakmp
134134
- https://github.com/krasimir/react-in-patterns/tree/master/patterns/presentational-and-container
135135
- https://medium.com/@learnreact/container-components-c0e67432e005

patterns/26.third-party-integration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,5 @@ class Tags extends React.Component {
8383
}
8484
}
8585
```
86-
### Reference:
86+
### Related links:
8787
- https://github.com/krasimir/react-in-patterns/tree/master/patterns/third-party

patterns/27.passing-function-to-setState.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ this.setState({ expanded: !this.state.expanded });
3030
this.setState(prevState => ({ expanded: !prevState.expanded }));
3131
```
3232

33-
### Reference
33+
### Related links:
3434
- https://medium.com/javascript-scene/setstate-gate-abc10a9b2d82

patterns/29.feature-flags-using-redux.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,6 @@ export isFeatureEnabled({ features }, featureName) {
105105
return isFeatureEnabledSelector(features, featureName);
106106
}
107107
```
108-
### Reference:
108+
### Related links:
109109
- http://blog.rstankov.com/feature-flags-in-react/
110110
- https://gist.github.com/RStankov/0e764f27daf38f2fcd81b82360334528

patterns/30.component-switch.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ Page.propTypes = {
2626
};
2727
```
2828

29-
### Reference:
29+
### Related links:
3030
- https://hackernoon.com/10-react-mini-patterns-c1da92f068c5

patterns/32.list-components.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ If things get more complex or you want to use this component elsewhere,
2121
you should be able to copy/paste the code out into a new component.
2222
Don’t prematurely componentize.
2323

24-
### Reference:
24+
### Related links:
2525
- https://hackernoon.com/10-react-mini-patterns-c1da92f068c5
2626

perf-tips/01.shouldComponentUpdate-check.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,5 @@ export default class AutocompleteItem extends React.Component {
7272
}
7373
```
7474

75-
### Reference:
75+
### Related links:
7676
- [React Performance optimization](https://medium.com/@nesbtesh/react-performance-optimization-28ec5b61fff3)

perf-tips/02.pure-component.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ export default class Example extends PureComponent {
3636
})
3737
```
3838

39-
### Reference:
39+
### Related links:
4040
- [Recompose](https://github.com/acdlite/recompose#composition)
4141
- [React: PureComponent](https://facebook.github.io/react/docs/react-api.html#react.purecomponent)

perf-tips/03.reselect.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ const doubleRes = createSelector(
4040
})
4141
);
4242
```
43-
### Reference:
43+
### Related links:
4444
- [React](https://medium.com/@esamatti/react-js-pure-render-performance-anti-pattern-fb88c101332f#.cz2ypc2ob)

ux-variations/01.composing-variations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,5 @@ class MemberSignIn extends Component {
5656
export default MemberSignIn;
5757
```
5858

59-
### Reference:
59+
### Related links:
6060
- [Slides from my talk: Building Multi-tenant UI with React](https://speakerdeck.com/vasa/building-multitenant-ui-with-react-dot-js)

ux-variations/02.toggle-ui-elements.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ class PasswordField extends Component {
3737
}
3838
```
3939

40-
### Reference:
40+
### Related links:
4141
- [Slides from my talk: Building Multi-tenant UI with React](https://speakerdeck.com/vasa/building-multitenant-ui-with-react-dot-js)

ux-variations/05.wrapper-components.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ const Parent = () => {
2020
</div>
2121
};
2222
```
23-
### Reference:
23+
### Related links:
2424
- [Slides from my talk: Building Multi-tenant UI with React](https://speakerdeck.com/vasa/building-multitenant-ui-with-react-dot-js)

ux-variations/06.display-order-variations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ class PageSections extends Component {
1919
}
2020
}
2121
```
22-
### Reference:
22+
### Related links:
2323
- [Slides from my talk: Building Multi-tenant UI with React](https://speakerdeck.com/vasa/building-multitenant-ui-with-react-dot-js)

0 commit comments

Comments
 (0)