Skip to content

Commit 45038ea

Browse files
committed
Deprecated modStateO and modStateU.
1 parent 7947682 commit 45038ea

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

core/src/main/scala/japgolly/scalajs/react/package.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,11 @@ package object react {
286286
@inline def modState(f: S => S, cb: OpCallback = undefined)(implicit C: CC): Unit =
287287
setState(f(state), cb)
288288

289+
@deprecated("modStateO will be removed in v0.8.x", "v0.7.0")
289290
@inline def modStateO(f: S => Option[S], cb: OpCallback = undefined)(implicit C: CC): Unit =
290291
f(state).fold(())(setState(_, cb))
291292

293+
@deprecated("modStateU will be removed in v0.8.x", "v0.7.0")
292294
@inline def modStateU(f: S => UndefOr[S], cb: OpCallback = undefined)(implicit C: CC): Unit =
293295
f(state).fold(())(setState(_, cb))
294296

doc/CHANGELOG-0.7.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ https://gist.github.com/japgolly/c68482dbadb0077f550c
1010
* More supported React tags and attributes.
1111
* More ScalazReact extensions: `{state,setState,modState,modStateF}IO`.
1212
* Removed deprecated methods marked for removal in 0.7.0.
13+
* Deprecated `modStateO` and `modStateU`.
1314

1415
##### Refs
1516
* Refs can now be applied to components from the outside, prior to mounting. ([#44](https://github.com/japgolly/scalajs-react/issues/44))

0 commit comments

Comments
 (0)