Skip to content

Commit 0ca405f

Browse files
committed
Merge branch 'series/4.0'
2 parents a7cb781 + 903bd36 commit 0ca405f

147 files changed

Lines changed: 40337 additions & 5494 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ name: CI
33
on:
44
pull_request:
55
push:
6+
branches:
7+
- '**'
68
paths:
9+
- '.github/workflows/ci.yml'
710
- 'bin/**'
811
- 'downstream-tests/**'
912
- 'library/**'

‎.gitignore‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@
1717
metals.sbt
1818
node_modules/
1919
target
20-
.direnv/
20+
.direnv/
21+
.DS_Store

‎README.md‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ Includes a router, testing utils, performance utils, more.
2222
- [Hooks](doc/HOOKS.md)
2323
- [Hooks via builder](doc/HOOKS_BUILDER.md)
2424
- [Refs](doc/REFS.md)
25-
- [IDE support](doc/IDE.md)
2625
- [The `Callback` class](doc/CALLBACK.md)
2726
- [React Context](doc/CONTEXT.md)
2827
- Delving deeper
@@ -72,9 +71,9 @@ Includes a router, testing utils, performance utils, more.
7271
* [scastie](https://github.com/scalacenter/scastie) - An interactive playground for Scala [https://scastie.scala-lang.org](https://scastie.scala-lang.org)
7372

7473
##### Requirements:
75-
* React ≥ 18
74+
* React ≥ 19
7675
* Scala ≥ 2.13
77-
* Scala.JS ≥ 1.10
76+
* Scala.JS ≥ 1.20
7877

7978
##### Support:
8079
If you like what I do

‎bin/ci‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ cmd=(
6060
-J-Xmx3G
6161
-J-XX:+UseG1GC
6262
++$SCALA_VER
63-
'set ThisBuild / parallelExecution := false'
64-
'set Global / concurrentRestrictions += Tags.limit(ScalaJSTags.Link, 1)'
6563
clean
6664
test # Test development-mode
6765
'set ThisBuild / scalaJSStage := FullOptStage' test # Test production-mode

‎bin/update_react_version‎

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,18 @@ cd "$(dirname "$0")/.." || exit 1
44
[ $# -ne 1 ] && echo "Usage: $0 <version>" && exit 1
55
ver="$1"
66

7-
perl -pi -e 's/(?<![a-zA-Z0-9_-])[1-3]\d\.\d+\.\d+(?![a-zA-Z0-9_-])/'"$ver"'/g' \
8-
*.md \
9-
doc/*.md \
10-
library/build.sbt \
11-
library/ghpages/html/*.html \
12-
library/project/*.* \
13-
&& git diff -U0
7+
perl -pi -e 's/\b19\.\d+\.\d+\b/'"$ver"'/' \
8+
js-sandbox/index.html \
9+
library/ghpages/html/*.html
1410

11+
perl -pi -e 's/("react.*)\b19\.\d+\.\d+\b/${1}'"$ver"'/' \
12+
react-umd/package.json
13+
14+
cd react-umd
15+
echo "Rebuilding React UMD..."
16+
rm -rf dist package-lock.json
17+
npm install
18+
npm run build
19+
cd ..
20+
21+
git diff -U0

‎doc/CONFIG.md‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* Runtime Settings *(development-mode only)*
1010
* [Usage](#runtime-settings-usage)
1111
* [`Reusability.disableGloballyInDev()`](#reusabilitydisablegloballyindev)
12-
* ~~[`ReusabilityOverlay.overrideGloballyInDev()`](#reusabilityoverlayoverridegloballyindev)~~
1312
* [Custom `ReusabilityOverride`](#custom-reusabilityoverride)
1413

1514

@@ -208,17 +207,6 @@ object Main {
208207

209208
This globally disables `Reusability.shouldComponentUpdate` so that it doesn't nothing.
210209

211-
212-
# `ReusabilityOverlay.overrideGloballyInDev()`
213-
214-
**[ReusabilityOverlay has been deprecated in v3 with no replacement — use React's Profiler instead]**
215-
216-
*Note: Runtime settings only affect development-mode (`fastOptJS`) and must be applied before any components are created.*
217-
218-
This makes calls to `Reusability.shouldComponentUpdate` also display a little UI overlay for you to inspect/debug
219-
component updates. You can see a [live example of this in use here](https://japgolly.github.io/scalajs-react/#examples/reusability).
220-
221-
222210
# Custom `ReusabilityOverride`
223211

224212
*Note: Runtime settings only affect development-mode (`fastOptJS`) and must be applied before any components are created.*

‎doc/IDE.md‎

Lines changed: 0 additions & 93 deletions
This file was deleted.

‎doc/REFS.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,20 @@ def render =
8484
<.input(^.untypedRef(refOrNull = _))
8585
```
8686

87+
Or you can pass in a `Dom => (() => Unit)` which returns a cleanup function.
88+
89+
```scala
90+
var refOrNull: html.Input = null
91+
92+
def render =
93+
<.input(^.untypedRef.withCleanup { n =>
94+
refOrNull = n
95+
() => {
96+
println("Reference is being cleaned up...")
97+
}
98+
})
99+
```
100+
87101
The second is to create a `Ref` object and wire it up like a normal vdom attribute:
88102

89103
```scala

0 commit comments

Comments
 (0)