|
1 | | -# 0.10.2 (unreleased) |
2 | | - |
3 | | -##### Upgrade React to 0.14.3. |
4 | | -Adds new attributes: |
5 | | - * `integrity` |
6 | | - * `nonce` |
7 | | - * `reversed` |
8 | | - |
9 | | -React is now published to Bower in such a way that `ReactDOMServer` is accessible. |
10 | | -`ReactDOMServer` now appears in scalajs-react and its methods on `React` have been deprecated. |
11 | | - |
12 | | -To upgrade: |
13 | | - |
14 | | -1. Update your codebase to use `ReactDOMServer` with: |
15 | | - ``` |
16 | | - find . -name '*.scala' -exec perl -pi -e 's/(?<=React)([ .]+renderTo(?:String|StaticMarkup))(?!\w)/DOMServer$1/g' {} + |
17 | | - ``` |
18 | | - |
19 | | -2. Ensure that you change your dependencies in SBT to use Bower instead of NPM. |
20 | | - <br>[SBT snippet here](/doc/TESTING.md#setup). |
21 | | - |
22 | | -##### Core |
23 | | -* Added shortcuts for `<input>` DOM with type: `<.input.{type}`. |
24 | | - <br>Example: `<.input.text(…)` can replace ```<.input(^.`type` := "text", …)``` |
25 | | -* Bugfix: `CallbackTo(…).flatten` usage wouldn't compile. |
26 | | -* Bugfix: There were a number of `Event` methods missing and with incorrect signatures. *([diff](https://github.com/japgolly/scalajs-react/commit/010ab527f62013f82afc94f5bee1f5900d8ddcde))* |
27 | | -* Added `ReactMouseEvent.targetsNewTab_?` to determine whether a mouse event (applied to a link), would open it in a new tab? |
28 | | -* Added to `CallbackTo` object: |
29 | | - * `sequence` |
30 | | - * `sequenceO` |
31 | | - * `traverse` |
32 | | - * `traverseO` |
33 | | -* Added to `CallbackOption` object: |
34 | | - * `liftOptionCallback` |
35 | | - * `liftOptionLikeCallback` |
36 | | - * `sequence` |
37 | | - * `sequenceO` |
38 | | - * `traverse` |
39 | | - * `traverseO` |
40 | | -* Added type aliases to CompState: `{,Read,Write}Access{,D}, AccessRD`. |
41 | | -* Deprecated and renamed: |
42 | | - * `StateAccessCB` → `CompState.Access` |
43 | | - * `StateAccessDirect` → `CompState.AccessD` |
44 | | - |
45 | | -##### `extra` module |
46 | | -* Allow router-provided links to be opened in new tabs via the normal browser mechanisms (middle-click, ctrl-click). |
47 | | -* Add convenience methods to `router.BaseUrl`: |
48 | | - * `BaseUrl.fromWindowUrl(String => String)` |
49 | | - * `BaseUrl.until(String)` |
50 | | - * `BaseUrl.until_#` ← Replaces `BaseUrl(dom.window.location.href.takeWhile(_ != '#'))` |
51 | | -* Add to `ExternalVar` and `ReusableVar` objects: `s$(state, $)`. |
52 | | - |
53 | | -##### `ext-monocle` module |
54 | | -* Add to component scopes: `modStateL` and `setStateL`. |
55 | | -* Add to `ExternalVar` and `ReusableVar` objects: `at(lens)(state, $)`. |
56 | | - |
57 | | -##### `ext-scalaz` module |
58 | | -* Add `Monad[CallbackOption]`. |
59 | | - |
60 | | -##### `test` module |
61 | | -* More test event properties settable. *([diff](https://github.com/japgolly/scalajs-react/commit/d58883a58becc1eda6aa5371a55e798c2d1b71c0))* |
62 | | -* Many `Simulation` events now get default event properties. (prevents stupid PhantomJS crashing) *([diff](https://github.com/japgolly/scalajs-react/commit/5a20e96e27e78af86c691f52565941029ec7e35b))* |
63 | | - |
64 | | ---- |
65 | | - |
66 | | -# 0.10.1 ([commit log](https://github.com/japgolly/scalajs-react/compare/v0.10.0...v0.10.1)) |
67 | | - |
68 | | -* Added conversions between `Callback` and `Future`. |
69 | | - |
70 | | - | Input | Method | Output | |
71 | | - | -------------------------- | ---------------------- | ----------------------- | |
72 | | - | `CallbackTo[A]` | `cb.toFuture` | `Future[A]` | |
73 | | - | `CallbackTo[Future[A]]` | `cb.toFlatFuture` | `Future[A]` | |
74 | | - | `=> Future[A]` | `CallbackTo(f)` | `CallbackTo[Future[A]]` | |
75 | | - | `=> Future[CallbackTo[A]]` | `CallbackTo.future(f)` | `CallbackTo[Future[A]]` | |
76 | | - | `=> Future[CallbackTo[A]]` | `Callback.future(f)` | `Callback` | |
77 | | - |
78 | | - If you're looking for ways to block (eg. turning a `Callback[Future[A]]` into a `Callback[A]`), |
79 | | - it is not supported by Scala.JS (See [#1996](https://github.com/scala-js/scala-js/issues/1996)). |
80 | | - |
81 | | - **NOTE:** It's important that when going from `Future` to `Callback`, you're aware of when the `Future` is instantiated. |
82 | | - |
83 | | - ```scala |
84 | | - def queryServer: Future[Data] = ??? |
85 | | - |
86 | | - def updateComponent: Future[Callback] = |
87 | | - queryServer.map($ setState _) |
88 | | - |
89 | | - // This is GOOD because the callback wraps the updateComponent *function*, not an instance. |
90 | | - Callback.future(updateComponent) |
91 | | - |
92 | | - // This is BAD because the callback wraps a single instance of updateComponent. |
93 | | - // 1) The server will be contacted immediately instead of when the callback executes. |
94 | | - // 2) If the callback is executed more than once, the future and old result will be reused. |
95 | | - val f = updateComponent |
96 | | - Callback.future(f) |
97 | | - |
98 | | - // This is GOOD too because the future is created inside the callback. |
99 | | - Callback.future { |
100 | | - val f = updateComponent |
101 | | - f.onComplete(???) |
102 | | - f |
103 | | - } |
104 | | - ``` |
105 | | - |
106 | | -* Add `CallbackOption.{pass,fail}`. |
107 | | - |
108 | | -* Add `Callback{,Option}.voidExplicit`. |
109 | | - |
110 | | -* Add `React.Children.toArray`. |
111 | | - |
112 | | -* Upgrade React to 0.14.1. Adds new attributes: |
113 | | - * `default` |
114 | | - * `kind` |
115 | | - * `srcLang` |
116 | | - |
117 | | -* Upgrade Scala.JS to 0.6.5. |
118 | | - |
119 | | ---- |
120 | | - |
121 | 1 | # 0.10.0 ([commit log](https://github.com/japgolly/scalajs-react/compare/v0.9.2...v0.10.0)) |
122 | 2 |
|
123 | 3 | This release packs a lot of changes to improve the quality, safety and coding experience. |
|
0 commit comments