Skip to content

Commit 1b98dcb

Browse files
authored
Merge pull request #1090 from japgolly/lazy-reuse-component
Make reuse component lazy
2 parents 3c0f6fa + 5c59b93 commit 1b98dcb

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
- v*.*.*
77

88
jobs:
9-
109
ci:
1110
runs-on: ubuntu-latest
1211
strategy:
@@ -18,7 +17,6 @@ jobs:
1817
scala: 3
1918
name: Scala v${{ matrix.scala }} / Java v${{ matrix.java }}
2019
steps:
21-
2220
- name: Git checkout
2321
uses: actions/checkout@v4
2422
with:
@@ -37,7 +35,6 @@ jobs:
3735
needs: ci
3836
runs-on: ubuntu-latest
3937
steps:
40-
4138
- uses: actions/checkout@v4
4239
with:
4340
fetch-depth: 0
@@ -46,7 +43,7 @@ jobs:
4643
uses: japgolly/[email protected]
4744

4845
- name: Release
49-
run: cd library && sbt ci-release
46+
run: cd library && sbt -v -J-Xmx6g ci-release
5047
env:
5148
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
5249
PGP_SECRET: ${{ secrets.PGP_SECRET }}

library/coreGeneric/src/main/scala/japgolly/scalajs/react/hooks/CustomHook.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ object CustomHook {
214214
Reusability( (a, b) => a.reusability.test(a.value, b.value) )
215215

216216
// Component for reuse. Must be stable.
217-
private val ReuseComponent = React.memo(ScalaFnComponent[ReuseComponentProps[Any]](_.renderVdom))
217+
private lazy val ReuseComponent = React.memo(ScalaFnComponent[ReuseComponentProps[Any]](_.renderVdom))
218218

219219
def shouldComponentUpdate[D](render: D => VdomNode)(implicit r: Reusability[D]): CustomHook[() => D, VdomNode] = {
220220
CustomHook[() => D]

0 commit comments

Comments
 (0)