Skip to content

Commit

Permalink
Update and rename 2018-04-23-380draft.md to 2018-04-23-chrome66-redu…
Browse files Browse the repository at this point in the history
…x-4.0-svelte-2.0.md
  • Loading branch information
azu committed Apr 23, 2018
1 parent e46c8bc commit ca3a320
Showing 1 changed file with 48 additions and 3 deletions.
@@ -1,15 +1,60 @@
---
title: "2018-04-23のJS: "
title: "2018-04-23のJS:Chrome 66、Redux 4.0、Svelte 2.0"
author: "azu"
layout: post
date : 2018-04-23T11:03:05.776Z
category: JSer
tags:
-
- chrome
- Redux
- svelte

---

JSer.info #380
JSer.info #380 - Chrome 66がリリースされました。

- [New in Chrome 66  |  Web  |  Google Developers](https://developers.google.com/web/updates/2018/04/nic66 "New in Chrome 66  |  Web  |  Google Developers")
- [Chrome Platform Status](https://www.chromestatus.com/features#milestone%3D66 "Chrome Platform Status")
- [Chromium Blog: Chrome 66 Beta: CSS Typed Object Model, Async Clipboard API, AudioWorklet](https://blog.chromium.org/2018/03/chrome-66-beta-css-typed-object-model.html "Chromium Blog: Chrome 66 Beta: CSS Typed Object Model, Async Clipboard API, AudioWorklet")

ECMAScriptの仕様(proposal)の実装として、
[JavaScriptがJSONのsuperset](https://github.com/tc39/proposal-json-superset)に、[trimStart/trimEnd](https://github.com/tc39/proposal-string-left-right-trim)のサポート、[catch節の引数省略](https://github.com/tc39/proposal-optional-catch-binding)に対応しています。

CSS Typed OM、CSS Paint API、AudioWorklet、[Mediaの`autoplay`のpolicy変更](https://developers.google.com/web/updates/2017/09/autoplay-policy-changes)、Fetch APIが`keepalive`オプションをサポートなどが行われいます。

----

Reduxのメジャーアップデートとして4.0.0がリリースされました。

- [Release v4.0.0 · reactjs/redux](https://github.com/reactjs/redux/releases/tag/v4.0.0)

BREAKING CHANGEについては次のIssueにまとめられていますが、TypeScriptの型改善、元々使われることを意図してない`ActionTypes`をprivateに、bundleをCommonJSとES moduleで公開するようにするといった変更が行われています。

- [Redux 4 breaking changes · Issue #1342 · reactjs/redux](https://github.com/reactjs/redux/issues/1342)

またReduxのReact bindingである[react-redux](https://github.com/reactjs/react-redux)はも[Redux 4.0.0に対応済](https://github.com/reactjs/react-redux/releases/tag/v5.0.7)ですが、Reactの新しいContext APIへの対応はまだ行われいません。

- [React 16 experiment: rewrite React-Redux to use new context API by markerikson · Pull Request #898 · reactjs/react-redux](https://github.com/reactjs/react-redux/pull/898)

----

コンパイルしてライブラリに依存しないJavaScriptとして動作するフレームワークであるSvelte v2がリリースされました。

- [Svelte v2 is out!](https://svelte.technology/blog/version-2)

JSXを参考にテンプレートの構文が変更され、マイグレーションツールとして[svelte-upgrade
](https://github.com/sveltejs/svelte-upgrade)が公開されています。
`oncreate``ondestroy`のライフサイクルメソッドの追加に伴い、`component.observe`が削除されています。
またコンポーネントからの値のとり方が`component.get('foo')`のような`component.get().foo`のように変更されています。

以前は`"42"`のような数字の文字列を渡すと文字列として評価されていましたが、`{1}`のようにリテラルを使って数値として渡さないと行けないように修正されています。

```
// Before – pass number string and treat as numbers
<Counter start='1'/>
// After – should pass as numbers
<Counter start={1}/>
```

----

Expand Down

0 comments on commit ca3a320

Please sign in to comment.