Skip to content

Commit

Permalink
release documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rpiaggio committed Jan 29, 2024
1 parent dc8a164 commit cb86b46
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 39 deletions.
54 changes: 54 additions & 0 deletions doc/changelog/2.2.0-betas.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 2.2.0-beta*x*

# Changes in beta1

- Upgrade to React 18.

- List of implemented features is here: https://github.com/japgolly/scalajs-react/issues/1057
- For the moment, using class components emits the `Until you switch to the new API, your app will behave as if it’s running React 17.` warning, even if the app was initialized the React 18 way (see [here](https://react.dev/blog/2022/03/08/react-18-upgrade-guide#updates-to-client-rendering-apis)).

- Addition of `React.majorVersion: Int`.

- Added a new typeclass `Renderable`, now required to invoke `render*` and `hydrate*` methods. Instances are provided for the expected types.

- Dependencies updates:

- Scala.js upgraded to 1.15.0
- microlibs upgraded to 4.2.1
- Scala 3 upgraded to 3.1.2

- Added test utilities:

- `TestContainer`/`TestReactRoot` and `.{outer,inner}HTML.assert*`
- `WithDsl.*`
- `replaceProps` replacement

- To upgrade when using `jsDependencies`, make your sbt config look like this (comments for clarity)

```scala
// Required for React 18.0.0
dependencyOverrides += "org.webjars.npm" % "scheduler" % "0.22.0",

jsDependencies ++= Seq(
// Polyfill required for React 18.0.0
"org.webjars.npm" % "fast-text-encoding" % "1.0.3" / "text.js" minified "text.min.js"

"org.webjars.npm" % "react" % "18.0.0"
/ "umd/react.development.js"
minified "umd/react.production.min.js"
dependsOn "text.js" // <-- Load the fast-text-encoding polyfill before loading React itself
commonJSName "React",

"org.webjars.npm" % "react-dom" % "18.0.0"
/ "umd/react-dom.development.js"
minified "umd/react-dom.production.min.js"
dependsOn "umd/react.development.js"
commonJSName "ReactDOM",

"org.webjars.npm" % "react-dom" % "18.0.0"
/ "umd/react-dom-server.browser.development.js"
minified "umd/react-dom-server.browser.production.min.js"
dependsOn "umd/react-dom.development.js"
commonJSName "ReactDOMServer",
),
```
69 changes: 35 additions & 34 deletions doc/changelog/2.2.0.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,50 @@
# 2.2.0

TODO: Add demo/doc for new testing API
* `TestContainer`/`TestReactRoot` and `.{outer,inner}HTML.assert*`
* `WithDsl.*`
* `replaceProps` replacement

* `React.majorVersion`
- `TestContainer`/`TestReactRoot` and `.{outer,inner}HTML.assert*`
- `WithDsl.*`
- `replaceProps` replacement

* Added a new typeclass `Renderable`
- `React.majorVersion`

* Upgrade to React 18
- Added a new typeclass `Renderable`

* `LegacyReactTestUtils`
- Upgrade to React 18

* Scala.js upgraded to 1.10.0
* microlibs upgraded to 4.1.0
* Scala 3 upgraded to 3.1.2
- `LegacyReactTestUtils`

* To upgrade when using `jsDependencies`, make your sbt config look like this (comments for clarity)
- Scala.js upgraded to 1.15.0
- microlibs upgraded to 4.2.1
- Scala 3 upgraded to 3.1.2

```scala
// Required for React 18.0.0
dependencyOverrides += "org.webjars.npm" % "scheduler" % "0.22.0",
- To upgrade when using `jsDependencies`, make your sbt config look like this (comments for clarity)

jsDependencies ++= Seq(
```scala
// Required for React 18.0.0
dependencyOverrides += "org.webjars.npm" % "scheduler" % "0.22.0",

// Polyfill required for React 18.0.0
"org.webjars.npm" % "fast-text-encoding" % "1.0.3" / "text.js" minified "text.min.js"
jsDependencies ++= Seq(

"org.webjars.npm" % "react" % "18.0.0"
/ "umd/react.development.js"
minified "umd/react.production.min.js"
dependsOn "text.js" // <-- Load the fast-text-encoding polyfill before loading React itself
commonJSName "React",
// Polyfill required for React 18.0.0
"org.webjars.npm" % "fast-text-encoding" % "1.0.3" / "text.js" minified "text.min.js"

"org.webjars.npm" % "react-dom" % "18.0.0"
/ "umd/react-dom.development.js"
minified "umd/react-dom.production.min.js"
dependsOn "umd/react.development.js"
commonJSName "ReactDOM",
"org.webjars.npm" % "react" % "18.0.0"
/ "umd/react.development.js"
minified "umd/react.production.min.js"
dependsOn "text.js" // <-- Load the fast-text-encoding polyfill before loading React itself
commonJSName "React",

"org.webjars.npm" % "react-dom" % "18.0.0"
/ "umd/react-dom-server.browser.development.js"
minified "umd/react-dom-server.browser.production.min.js"
dependsOn "umd/react-dom.development.js"
commonJSName "ReactDOMServer",
),
```
"org.webjars.npm" % "react-dom" % "18.0.0"
/ "umd/react-dom.development.js"
minified "umd/react-dom.production.min.js"
dependsOn "umd/react.development.js"
commonJSName "ReactDOM",

"org.webjars.npm" % "react-dom" % "18.0.0"
/ "umd/react-dom-server.browser.development.js"
minified "umd/react-dom-server.browser.production.min.js"
dependsOn "umd/react-dom.development.js"
commonJSName "ReactDOMServer",
),
```
9 changes: 4 additions & 5 deletions doc/changelog/next.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# 2.2.0


* Scala.js upgraded to 1.10.0
* microlibs upgraded to 4.1.0
* Scala 3 upgraded to 3.1.2
* Fixed the source map uri to point to the correct location
- Scala.js upgraded to 1.15.0
- microlibs upgraded to 4.2.1
- Scala 3 upgraded to 3.1.2
- Fixed the source map uri to point to the correct location

0 comments on commit cb86b46

Please sign in to comment.