You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: example/README.md
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ In addition to `render` function, it also supports [all the functions `React.Com
48
48
49
49
The first argument of each function must be `Self[WrappedProps, State]`, props must have type `Props[WrappedProps]`, and states must have type `State`.
50
50
51
-
For example, [`componentWillUpdate(nextProps, nextState)` function](https://facebook.github.io/react/docs/react-component.html#componentwillupdate) will be `componentWillUpdate(self: Self[WrappedProps, State], nextProps: Props[WrappedProps], nextState: State): Unit`:
51
+
For example, [`shouldComponentUpdate(nextProps, nextState)` function](https://reactjs.org/docs/react-component.html#shouldcomponentupdate) will be `shouldComponentUpdate(self: Self[WrappedProps, State], nextProps: Props[WrappedProps], nextState: State): Boolean`:
52
52
53
53
```scala
54
54
caseclassWrappedProps(/* ... */)
@@ -58,7 +58,7 @@ type Self = React.Self[WrappedProps, State]
While many want to use case classes as props, React requires props to be a plain JavaScript object. So, to use case classes, we need to wrap them in another property. In this facade, we wrap them in "wrapped" property.
@@ -122,6 +125,9 @@ You can extend it as you see needs. See [`RouterProps`](/router/src/main/scala/i
122
125
States are wrapped and unwrapped automatically, so you don't need to do `state.wrapped`. We can wrap and unwrap states automatically because nothing extends states; it is supposed to be local to each component.
0 commit comments