Full list of changes is at https://jekyllrb.com/docs/upgrading/2-to-3/. The tl;dr of it is: - Relative permalinks were removed, so all the files in the `docs` subdirectory need their permalink to be prefixed with `docs/` - `post` and `page` types were renamed to `posts` and `pages` respectively - `jekyll-paginate`, `pygments` and `redcarpet` are all now optional, so I needed to explicitly add it to the Gemfile. Jekyll now uses `rouge` rather than `pygments` for syntax highlighting, but rouge does not support highlighting individual lines (`hl_lines`) so we need to continue using Pygments. - Layout metadata (eg. `sectionid`) is now on a `layout` variable rather than `page` Tested the following pages and confirmed that they all work: - "Docs" link (getting started page): http://127.0.0.1:4000/react/docs/getting-started.html - Downloads: http://127.0.0.1:4000/react/downloads.html - Tutorial: http://127.0.0.1:4000/react/docs/tutorial.html - A few pages under the "docs" subdirectory, to confirm they're working properly: - http://127.0.0.1:4000/react/docs/addons.html - http://127.0.0.1:4000/react/docs/why-react.html - http://127.0.0.1:4000/react/docs/create-fragment.html - A few tips: - http://127.0.0.1:4000/react/tips/false-in-jsx.html - http://127.0.0.1:4000/react/tips/style-props-value-px.html - Non-English versions of the page: - http://127.0.0.1:4000/react/docs/getting-started-it-IT.html - http://127.0.0.1:4000/react/docs/getting-started-ja-JP.html
2.2 KiB
id, title, permalink, prev, next
| id | title | permalink | prev | next |
|---|---|---|---|---|
| addons | アドオン | docs/addons-ja-JP.html | tooling-integration-ja-JP.html | animation-ja-JP.html |
React.addons はReactのアプリケーションを作成する上で便利なユーティリティを置いておくための場所です。 それらは実験的なものであると考えられるべきです。 しかし、ゆくゆくはコアに入ってくるか、以下のような承認されたユーティリティとなるでしょう。
-
アニメーションや推移を扱う
TransitionGroupやCSSTransitionGroupは多くの場合実行するのが簡単ではありません。例えば、コンポーネントの削除の前などは。 -
LinkedStateMixinはユーザのフォームの入力データとコンポーネントのstateの間の調整を単純化します。 -
cloneWithPropsはReactのコンポーネントのシャローコピーを作成したり、それらのpropsを変更したりします。 -
createFragmentは外部のキー化された子要素のセットを作成します。 -
updateはJavaScriptでイミュータブルなデータを扱うことを簡単にするヘルパーの関数です。 -
PureRenderMixinは特定のシチュエーションでパフォーマンスを改善します。 以下のアドオンはReactだけの開発版(縮小されていない版)です。 -
TestUtilsはテストケースを記述する単純なヘルパーです(縮小されていないビルドのみ)。 -
Perfはパフォーマンスを測り、どこを最適化するかのヒントを与えます。
アドオンを使うには、共通の react.js を使うよりも react-with-addons.js (とその縮小されたもの)を使ってください。
npmからReactのパッケージを使う際には、Reactと全てのアドオンを使うために require('react') を使う代わりに、単純に require('react/addons') を使ってください。