{"id":239,"date":"2016-01-25T12:00:00","date_gmt":"2016-01-25T03:00:00","guid":{"rendered":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/blog\/2016\/01\/25\/read-virtual-dom-library-deku"},"modified":"2022-10-28T21:38:40","modified_gmt":"2022-10-28T12:38:40","slug":"read-virtual-dom-library-deku","status":"publish","type":"post","link":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/blog\/2016\/01\/25\/read-virtual-dom-library-deku\/","title":{"rendered":"\u4eee\u60f3DOM\u30e9\u30a4\u30d6\u30e9\u30ea\u306edeku\u3092\u8aad\u3093\u3060\u8a71"},"content":{"rendered":"

\u82f1\u8a9e\u306e\u52c9\u5f37\u3092\u3059\u308b\u305e\u3068\u610f\u6c17\u8fbc\u307f\u3001\u5b57\u5e55\u306a\u3057\u3067\u52d5\u753b\u3092\u89b3\u59cb\u3081\u305f\u3068\u3053\u308d\u30d5\u30e9\u30f3\u30b9\u304c\u821e\u53f0\u306e\u30c9\u30ad\u30e5\u30f3\u30bf\u30ea\u30fc\u3092\u89b3\u3066\u3044\u305f\u3053\u3068\u306b\u6c17\u4ed8\u3044\u305f\u5c0f\u98fc\u3067\u3059\u3002<\/p>\n

React.js<\/code>\u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u69cb\u7bc9\u3059\u308b\u306b\u3042\u305f\u308a\u3001\u305d\u306e\u5185\u90e8\u5b9f\u88c5\u306b\u3064\u3044\u3066\u7406\u89e3\u3057\u3066\u4f7f\u3063\u3066\u3044\u308b\u30b1\u30fc\u30b9\u306f\u5fc5\u305a\u3057\u3082\u591a\u304f\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u3002
\n\u7279\u306bReact.js<\/code>\u306e\u60c5\u5831\u304c\u3042\u3075\u308c\u3066\u3044\u308b\u3088\u3046\u306a\u6628\u4eca\u3067\u306f\u3001\u5185\u90e8\u5b9f\u88c5\u3092\u304d\u3061\u3093\u3068\u7406\u89e3\u3057\u3088\u3046\u3068\u3059\u308b\u3053\u3068\u304c\u76f4\u63a5\u7684\u306b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u69cb\u7bc9\u306e\u751f\u7523\u6027\u306b\u5bc4\u4e0e\u3059\u308b\u3068\u306f\u9650\u308a\u307e\u305b\u3093\u3002<\/p>\n

\u305f\u3060\u3001\u5358\u306a\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30e6\u30fc\u30b6\u30fc\u3067\u3044\u308b\u3068\u601d\u308f\u306c\u843d\u3068\u3057\u7a74\u306b\u5165\u308a\u8fbc\u307e\u306a\u3044\u3068\u3082\u9650\u308a\u307e\u305b\u3093\u3057\u3001API<\/code>\u306e\u5909\u66f4\u304c\u3042\u3063\u305f\u5834\u5408\u306b\u3082\u552f\u3005\u8afe\u3005\u3068\u958b\u767a\u5074\u306e\u65b9\u91dd\u306b\u5023\u3046\u3053\u3068\u3057\u304b\u3067\u304d\u307e\u305b\u3093\u3002
\n\u3082\u3061\u308d\u3093\u305d\u308c\u306f\u5185\u90e8\u5b9f\u88c5\u3092\u7406\u89e3\u3057\u3066\u3044\u305f\u3068\u3053\u308d\u3067\u5927\u304d\u304f\u4e8b\u60c5\u306f\u5909\u308f\u308a\u307e\u305b\u3093\u304c\u3001\u5c11\u306a\u304f\u3068\u3082\u81ea\u5206\u306a\u308a\u306e\u7d0d\u5f97\u306e\u3044\u304f\u7406\u89e3\u306f\u4f5c\u308c\u308b\u304b\u3082\u77e5\u308c\u307e\u305b\u3093\u3057\u3001\u3082\u3057\u81ea\u5206\u306e\u72b6\u6cc1\u306b\u305d\u3050\u308f\u306a\u3044\u306e\u3067\u3042\u308c\u3070\u5225\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u9078\u5b9a\u3059\u308b\u3088\u3046\u306a\u9078\u629e\u80a2\u3082\u9078\u3073\u5f97\u308b\u3068\u601d\u3044\u307e\u3059\u3002
\n\u305d\u306e\u610f\u5473\u3067(React.js<\/code>\u306b\u9650\u3063\u305f\u8a71\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c)\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u5185\u90e8\u5b9f\u88c5\u3092\u304d\u3061\u3093\u3068\u7406\u89e3\u3057\u3066\u304a\u304f\u3053\u3068\u306f\u3001\u3068\u3066\u3082\u5927\u4e8b\u3067\u3001\u304b\u3064\u5b89\u5fc3\u3067\u304d\u308b\u958b\u767a\u74b0\u5883\u306b\u3082\u3064\u306a\u304c\u308b\u3068\u8003\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n

\u3055\u3066\u3001React.js<\/code>\u306e\u6d41\u884c\u3068\u5171\u306b\u3001\u305d\u306e\u672c\u8cea\u3067\u3042\u308b\u4eee\u60f3DOM\u306e\u5b9f\u88c5\u304c\u3044\u304f\u3064\u3082\u51fa\u3066\u304d\u307e\u3057\u305f\u3002
\n\u305d\u3053\u3067\u672c\u7a3f\u3067\u306f\u30b3\u30fc\u30c9\u30d9\u30fc\u30b9\u304c\u5927\u304d\u304f\u8aad\u307f\u4e0b\u3059\u3053\u3068\u304c\u96e3\u3057\u3044React.js<\/code>\u306e\u524d\u306b\u3001\u30b7\u30f3\u30d7\u30eb\u306a\u4eee\u60f3DOM\u5b9f\u88c5\u3092\u8aad\u3093\u3067\u307f\u3066\u3001
\nReact.js<\/code>\u304c\u672c\u8cea\u7684\u306b\u306f\u3069\u3093\u306a\u51e6\u7406\u3092\u62c5\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3042\u308b\u304b\u3092\u7406\u89e3\u3059\u308b\u4e00\u52a9\u3068\u3057\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n

\u3044\u304f\u3064\u304b\u5b9f\u88c5\u306e\u6709\u308b\u4e2d\u3067\u3001\u30b3\u30fc\u30c9\u30d9\u30fc\u30b9\u304c\u5c0f\u3055\u304f\u63d0\u4f9b\u3059\u308bAPI\u304c\u30b7\u30f3\u30d7\u30eb\u3067\u3042\u308b\u3088\u3046\u306b\u610f\u56f3\u3055\u308c\u305fdeku<\/code>\u3092\u9078\u3073\u307e\u3057\u305f\u3002<\/p>\n

deku\u306egithub\u30ec\u30dd\u30b8\u30c8\u30ea<\/a>
\n
deku\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a><\/p>\n

\u306a\u304a\u3001\u672c\u7a3f\u57f7\u7b46\u6642\u70b9\u306e\u6700\u65b0\u516c\u958b\u7248\u3067\u3042\u308b2.0.0-rc7<\/code>\u3092\u5bfe\u8c61\u3068\u3057\u3066\u3044\u307e\u3059\u3002
\n\u975e\u5e38\u306b\u6d3b\u767a\u306a\u958b\u767a\u304c\u884c\u308f\u308c\u3066\u3044\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u306e\u3067\u3001\u672c\u7a3f\u516c\u958b\u6642\u70b9\u30672.0.0-rc13<\/code>\u306b\u307e\u3067\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002
\n\u307e\u305f\u3001\u3053\u3061\u3089\u306f\u30e1\u30b8\u30e3\u30fc\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u7248\u3067\u3059\u306e\u3067\u3001\u904e\u53bb\u306b\u516c\u958b\u3055\u308c\u305fdeku<\/code>\u306e\u8a18\u4e8b\u3068\u306fAPI<\/code>\u304c\u7570\u306a\u3063\u3066\u3044\u308b\u30b1\u30fc\u30b9\u304c\u591a\u3005\u3042\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n

npm\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u8aad\u3080\u524d\u306b<\/h2>\n

deku<\/code>\u3084React.js<\/code>\u3092\u59cb\u3081\u3068\u3059\u308bnpm<\/code>\u3067\u914d\u5e03\u3055\u308c\u3066\u3044\u308b\u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u3001require<\/code>\u3055\u308c\u308b\u3068package.json<\/code>\u306emain<\/code>\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u8a18\u8ff0\u3055\u308c\u305f\u30d1\u30b9\u3092\u8aad\u307f\u8fbc\u3080\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002
\n
The main field is a module ID that is the primary entry point to your program<\/a><\/p>\n

"main": "lib\/index.js",<\/code><\/pre>\n

\u6163\u7fd2\u7684\u306b\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u30dd\u30a4\u30f3\u30c8\u306b\u306f\u3001\u5916\u90e8\u306b\u516c\u958b\u3059\u308bAPI<\/code>\u3092\u6301\u3063\u305f\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u8aad\u307f\u8fbc\u3080\u3060\u3051\u306b\u3057\u3066\u3044\u308b\u5834\u5408\u304c\u591a\u3044\u3067\u3059\u3002<\/p>\n

\/\/ deku\/src\/index.js\nimport element from '.\/element'\nimport string from '.\/string'\nimport dom from '.\/dom'\n\nexport {\n  element,\n  string,\n  dom\n}<\/code><\/pre>\n

\u203b\u672c\u6765deku<\/code>\u304crequire<\/code>\u3055\u308c\u305f\u6642\u306b\u8aad\u307f\u8fbc\u3080\u306e\u306f\u3001src\/<\/code>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u306b\u3042\u308b\u30d5\u30a1\u30a4\u30eb\u3092babel<\/code>\u3067\u5909\u63db\u3057\u305flib\/<\/code>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u306a\u308a\u307e\u3059\u3002
\n\u4e00\u822c\u306bbabel<\/code>\u5909\u63db\u5f8c\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u53ef\u8aad\u6027\u304c\u4f4e\u304f\u958b\u767a\u8005\u306e\u610f\u56f3\u304c\u898b\u3048\u3065\u3089\u3044\u3053\u3068\u304b\u3089\u3001\u4ee5\u964d\u306fsrc<\/code>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u8aad\u3093\u3067\u3044\u304f\u3082\u306e\u3068\u3057\u307e\u3059\u3002<\/p>\n

\u307e\u305f\u3001\u4f59\u8ac7\u3067\u3059\u304cbabel-cli<\/code>\u3092\u59cb\u3081\u3068\u3059\u308bCLI<\/code>\u30c4\u30fc\u30eb\u306f\u3001\u30b3\u30de\u30f3\u30c9\u3068\u3057\u3066\u547c\u3073\u51fa\u3055\u308c\u305f\u6642\u306bbin<\/code>\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u8a18\u8ff0\u3055\u308c\u305f\u30d1\u30b9\u304b\u3089\u51e6\u7406\u304c\u59cb\u307e\u308a\u307e\u3059\u3002
\n
supply a bin field in your package.json which is a map of command name to local file name<\/a><\/p>\n

\u30d3\u30eb\u30c9\u7cfb\u30c4\u30fc\u30eb\u3084\u30c6\u30b9\u30c8\u30e9\u30f3\u30ca\u30fc\u306e\u30b3\u30fc\u30c9\u3092\u8aad\u3080\u6642\u306f\u3001\u3053\u306e\u8fba\u308a\u304b\u3089\u8aad\u307f\u59cb\u3081\u308b\u5fc5\u8981\u304c\u3042\u308a\u305d\u3046\u3067\u3059\u3002
\n\u6570\u306f\u5c11\u306a\u3044\u3067\u3059\u304c\u3001CDN\u306b\u5bfe\u5fdc\u3059\u308b\u306a\u3069script<\/code>\u30bf\u30b0\u3068\u3057\u3066\u8aad\u307f\u8fbc\u307e\u308c\u308b\u3088\u3046\u306a\u4f7f\u3044\u65b9\u3092\u610f\u56f3\u3057\u3066\u3044\u308b\u5834\u5408\u306fwindow<\/code>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3078\u306e\u3072\u3082\u4ed8\u3051\u51e6\u7406\u304c\u5165\u308b\u5834\u5408\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n

\u4e0a\u8ff0\u306e\u901a\u308a\u3001\u30a8\u30f3\u30c8\u30ea\u30fc\u30dd\u30a4\u30f3\u30c8\u306b\u306f\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30e6\u30fc\u30b6\u30fc\u306b\u5bfe\u3057\u3066\u9732\u51fa\u3055\u308c\u308b\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u66f8\u304b\u308c\u3066\u3044\u308b\u3060\u3051\u306e\u5834\u5408\u304c\u591a\u3044\u306e\u3067\u3001\u3069\u3093\u306a\u51e6\u7406\u304c\u59cb\u307e\u308b\u306e\u304b\u306f\u308f\u304b\u308a\u307e\u305b\u3093\u3002
\n\u305d\u306e\u5834\u5408\u306fREADME.md<\/code>\u306eGetting Started || Usage || Example<\/code>\u306a\u3069\u306e\u9805\u3092\u78ba\u8a8d\u3057\u3066\u3001\u51e6\u7406\u306e\u958b\u59cb\u70b9\u3068\u306a\u3063\u3066\u3044\u305d\u3046\u306a\u7b87\u6240\u304b\u3089\u8aad\u3093\u3067\u3044\u304d\u307e\u3059\u3002
\n(express<\/code>\u306e\u3088\u3046\u306bcreateApplication<\/code>\u306e\u3088\u3046\u306a\u3001\u660e\u3089\u304b\u306b\u51e6\u7406\u306e\u958b\u59cb\u70b9\u3068\u306a\u308b\u95a2\u6570\u304c\u8a18\u8ff0\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3082\u3042\u308a\u307e\u3059)<\/p>\n

\/\/ express\/lib\/express.js\nexports = module.exports = createApplication;\n\n\/\/ \u591a\u5206\u3053\u3053\u304b\u3089\u51e6\u7406\u304c\u306f\u3058\u307e\u3063\u3066\u3044\u308b...\nfunction createApplication() {\n  var app = connect();\n  merge(app, proto);\n  app.request = { __proto__: req, app: app };\n  app.response = { __proto__: res, app: app };\n  app.init();\n  return app;\n}<\/code><\/pre>\n

deku\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u30dd\u30a4\u30f3\u30c8<\/h2>\n

README.md<\/code>\u3092\u898b\u308b\u9650\u308a\u3001createRenderer<\/code>\u3068\u3044\u3046\u30d5\u30a1\u30af\u30c8\u30ea\u3089\u3057\u304d\u95a2\u6570\u304b\u3089\u51e6\u7406\u304c\u59cb\u307e\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n

import {dom, element} from 'deku'\n\/\/ (\u7565)...\nlet {createRenderer} = dom\n\n\/\/ (\u7565)...\n\/\/ Create a renderer that can turn vnodes into real DOM elements\nlet render = createRenderer(document.body, store.dispatch)\n\n\/\/ Update the page and add redux state to the context\nrender(\n  <MyButton>Hello World!<\/MyButton>,\n  store.getState()\n)<\/code><\/pre>\n

render\u306e\u751f\u6210<\/h2>\n

Create a renderer that can turn vnodes into real DOM elements<\/code>\u3068\u30b3\u30e1\u30f3\u30c8\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u306b\u3001
\n\u5f15\u6570\u306b\u6e21\u3057\u305f\u4eee\u60f3DOM\u3092\u5b9f\u969b\u306eDOM\u3068\u3057\u3066\u30d6\u30e9\u30a6\u30b6\u306b\u63cf\u753b\u3059\u308b\u95a2\u6570\u3092\u751f\u6210\u3059\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n

\u5b9f\u969b\u306e\u30b3\u30fc\u30c9\u306f\u3053\u3093\u306a\u611f\u3058\u3067\u3059\u3002<\/p>\n

\/\/ deku\/dom\/createRenderer.js\nimport createElement from '.\/createElement'\nimport {diffNode} from '..\/diff'\nimport patch from '.\/patch'\nimport uid from 'uid'\n\n\/**\n * Create a DOM renderer using a container element. Everything will be rendered\n * inside of that container. Returns a function that accepts new state that can\n * replace what is currently rendered.\n *\/\n\nexport default function createDOMRenderer (container, dispatch) {\n  \/\/ container: \u5b9f\u969b\u306e\u63cf\u753b\u3067\u30eb\u30fc\u30c8\u3068\u306a\u308b\u5b9fDOM\u30ce\u30fc\u30c9 Example\u3067\u306fdocument.body\n  \/\/ dispatch: Example\u3067\u306fdispatcher\n\n  let oldVnode = null\n  let node = null\n  let path = uid()\n\n  if (container && container.childNodes.length > 0) {\n    container.innerHTML = ''\n  }\n\n  let update = (newVnode, context) => {\n    \/\/ debugger\n    let changes = diffNode(oldVnode, newVnode, path)\n    node = changes.reduce(patch(dispatch, context), node)\n    oldVnode = newVnode\n    return node\n  }\n\n  let create = (vnode, context) => {\n    node = createElement(vnode, path, dispatch, context)\n    if (container) container.appendChild(node)\n    oldVnode = vnode\n    return node\n  }\n\n  \/\/ createDOMRenderer\u30af\u30ed\u30fc\u30b8\u30e3\u306e\u4e2d\u306enode\u5909\u6570\u306b\u30ad\u30e3\u30c3\u30b7\u30e5\u3055\u308c\u3066\u3044\u308b`\u524d\u56de\u306e\u63cf\u753b\u72b6\u614b`\u306b\u3088\u3063\u3066\u51e6\u7406\u3092\u632f\u308a\u5206\u3051\u308b\u95a2\u6570\u3092\u8fd4\u3057\u3066\u3044\u308b\n  return (vnode, context = {}) => {\n    return node !== null\n      ? update(vnode, context)\n      : create(vnode, context)\n  }\n}<\/code><\/pre>\n

create(DOM)Renderer<\/code>\u30af\u30ed\u30fc\u30b8\u30e3\u306e\u4e2d\u3067\u4fdd\u6301\u3055\u308c\u305fnode<\/code>\u5909\u6570\u306b\u30ad\u30e3\u30c3\u30b7\u30e5\u3055\u308c\u3066\u3044\u308b\u4f55\u304b\u3092\u5224\u65ad\u6750\u6599\u306b\u3001\u547c\u3073\u3060\u3059\u95a2\u6570\u3068\u7d50\u679c\u3092\u632f\u308a\u5206\u3051\u308b\u95a2\u6570\u3092\u8fd4\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002
\n\u3067\u306fnode<\/code>\u306b\u306f\u3069\u3093\u306a\u30c7\u30fc\u30bf\u304c\u5165\u3063\u3066\u3044\u308b\u306e\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n

\u5b9f\u969b\u306e\u63cf\u753b<\/h2>\n
\/\/ update function\nlet changes = diffNode(oldVnode, newVnode, path)\nnode = changes.reduce(patch(dispatch, context), node)\n\n\/\/ create function\nnode = createElement(vnode, path, dispatch, context)<\/code><\/pre>\n

\u3068\u306a\u3063\u3066\u3044\u3066\u3001\u3069\u3046\u3082\u4f55\u3089\u304b\u306eDOM\u30ce\u30fc\u30c9\u3001\u305d\u308c\u3082vnode<\/code>\u3068\u3044\u3046v<\/code>\u304c\u524d\u306b\u3064\u3044\u305f\u5909\u6570\u304c\u5225\u306b\u3042\u308b\u3053\u3068\u304b\u3089\u3001\u5b9fDOM\u30ce\u30fc\u30c9\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3057\u3066\u3044\u308b\u3088\u3046\u306b\u8aad\u307f\u53d6\u308c\u307e\u3059\u3002
\n\u5b9f\u969b\u306b\u306f\u3069\u3046\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n

\/\/ src\/dom\/createElement.js\nexport default function createElement (vnode, path, dispatch, context) {\n  \/\/ (\u7565)...\n  let DOMElement = cached.cloneNode(false)\n  \/\/ (\u7565)...\n\n  \/\/ vnode\u3092\u518d\u5e30\u7684\u306b\u63a2\u7d22\u3057\u3066\u5b50\u30ce\u30fc\u30c9\u3092\u9806\u6b21DOMElement\u306b\u8ffd\u52a0\u3057\u3066\u3044\u3063\u3066\u3044\u308b\n  vnode.children.forEach((node, index) => {\n    if (node === null || node === undefined) {\n      return\n    }\n    let child = createElement(\n      node,\n      createPath(path, node.key || index),\n      dispatch,\n      context\n    )\n    DOMElement.appendChild(child)\n  })\n\n  \/\/ \u5b9fDOM\u30ce\u30fc\u30c9\u3092\u8fd4\u3057\u3066\u3044\u308b\n  return DOMElement\n}<\/code><\/pre>\n

\u5b9fDOM\u30ce\u30fc\u30c9\u3092\u8fd4\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n

\/\/ update function\nlet changes = diffNode(oldVnode, newVnode, path)\nnode = changes.reduce(patch(dispatch, context), node)<\/code><\/pre>\n

\u521d\u56de\u306brender<\/code>\u95a2\u6570\u3092\u547c\u3073\u51fa\u3057\u305f\u6642\u306f\u4e00\u304b\u3089DOMElement\u3092\u69cb\u7bc9\u3057\u3066\u30ad\u30e3\u30c3\u30b7\u30e5\u3059\u308b\u3001\u4e8c\u56de\u76ee\u4ee5\u964d(node<\/code>\u5909\u6570\u306b\u5024\u304c\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308b\u306e\u3067update<\/code>\u95a2\u6570\u304c\u547c\u3073\u51fa\u3055\u308c\u308b\u3053\u3068\u304c\u8aad\u307f\u53d6\u308c\u307e\u3059)\u306f\u3001\u3053\u308c\u3082\u521d\u56de\u306b\u30ad\u30e3\u30c3\u30b7\u30e5\u3055\u308c\u305f\u53e4\u3044\u4eee\u60f3DOM\u30ce\u30fc\u30c9\u3068\u6700\u65b0\u306e\u4eee\u60f3DOM\u30ce\u30fc\u30c9\u306e\u5dee\u5206\u3092\u7b97\u51fa(diffNode<\/code>\u95a2\u6570)\u3001\u30d1\u30c3\u30c1\u3092\u5f53\u3066\u305f\u5b9fDOM\u30ce\u30fc\u30c9(patch<\/code>\u95a2\u6570)\u3092\u8fd4\u3059\u3088\u3046\u306a\u4ed5\u7d44\u307f\u306b\u306a\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n

\u4ee5\u4e0a\u306e\u3088\u3046\u306b\u3001render<\/code>\u95a2\u6570\u306b\u6700\u65b0\u306e\u72b6\u614b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8(store.getState()<\/code>)\u3092\u6e21\u3057\u3066\u547c\u3073\u3060\u3059\u3053\u3068\u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u63cf\u753b\/\u66f4\u65b0\u3059\u308b\u3068\u3044\u3046\u51e6\u7406\u306e\u6d41\u308c\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3057\u305f\u3002<\/p>\n

\u307e\u3068\u3081<\/h2>\n

deku<\/code>\u306e\u5b9f\u88c5\u3092\u30b6\u30c3\u3068\u8aad\u3093\u3067\u307f\u308b\u3053\u3068\u3067\u3001\u4eee\u60f3DOM\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u4e00\u4f53\u3069\u3046\u3044\u3063\u305f\u51e6\u7406\u3092\u3057\u3066\u3044\u308b\u306e\u304b\u3092\u8ffd\u3063\u3066\u307f\u307e\u3057\u305f\u304c\u3044\u304b\u304c\u3060\u3063\u305f\u3067\u3057\u3087\u3046\u304b\u3002
\n\u5b9f\u969b\u306e\u4eee\u60f3DOM\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u9078\u5b9a\u306b\u304a\u3044\u3066\u306f\u3001\u4eee\u60f3DOM\u540c\u58eb\u306e\u5dee\u5206\u691c\u51fa\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u52b9\u7387\u6027\u306b\u5404\u3005\u306e\u6027\u80fd\u304c\u51fa\u3066\u304f\u308b\u306f\u305a\u3067\u3059\u304c\u3001\u4eca\u56de\u306f\u5168\u4f53\u306e\u6d41\u308c\u3092\u8ffd\u3046\u3068\u3044\u3046\u76ee\u7684\u3067\u7701\u7565\u3057\u307e\u3057\u305f\u3002
\n(\u3072\u3068\u306b\u8aac\u660e\u3067\u304d\u308b\u307b\u3069\u7406\u89e3\u3057\u3066\u3044\u306a\u3044\u3068\u3082\u8a00\u3044\u307e\u3059\u304c...)<\/p>\n

deku<\/code>\u306e\u5b9f\u88c5\u306f\u975e\u5e38\u306b\u5c0f\u3055\u304f\u3001\u7d20\u76f4\u306b\u30b3\u30fc\u30c9\u3092\u8ffd\u3063\u3066\u3044\u304f\u3053\u3068\u3067\u7406\u89e3\u3057\u3084\u3059\u3044\u304d\u308c\u3044\u306a\u30b3\u30fc\u30c9\u3060\u3068\u611f\u3058\u307e\u3057\u305f\u3002
\n\u4eee\u60f3DOM\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u3057\u3066\u306f\u5fc5\u8981\u5341\u5206\u306a\u6a5f\u80fd\u3092\u6301\u3063\u3066\u3044\u308b\u3088\u3046\u306b\u601d\u3044\u307e\u3059\u3002<\/p>\n

\u30b5\u30a4\u30ba\u304c\u8efd\u3044\u306e\u304c\u30e2\u30d0\u30a4\u30eb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u69cb\u7bc9\u306e\u6642\u306a\u3069\u306b\u306f\u9b45\u529b\u7684\u3067\u3059\u304c\u3001\u4e00\u65b9\u3067\u5168\u3066\u306e\u4eee\u60f3DOM\u30c4\u30ea\u30fc\u3092\u30af\u30ed\u30fc\u30b8\u30e3\u306b\u30ad\u30e3\u30c3\u30b7\u30e5\u3059\u308b\u95a2\u4fc2\u4e0a\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u9762\u3067\u4e0d\u5b89\u304c\u6b8b\u308a\u307e\u3059\u3002
\n(\u3053\u308c\u306f\u4ed6\u306e\u5b9f\u88c5\u3067\u3042\u3063\u3066\u3082\u540c\u69d8\u3067\u3059\u304c...)<\/p>\n

\u3044\u305a\u308c\u306b\u3057\u308d\u3001\u5168\u4f53\u306e\u6d41\u308c\u3092\u628a\u63e1\u3059\u308b\u3053\u3068\u3067\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u6700\u9069\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u9078\u5b9a\u304c\u3057\u3084\u3059\u304f\u306a\u308b\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002
\n\u672c\u7a3f\u304c\u305d\u306e\u4e00\u52a9\u306b\u306a\u308c\u3070\u5e78\u3044\u3067\u3059\u3002<\/p>\n

React\u306a\u3069\u306b\u4ee3\u8868\u3055\u308c\u308b\u4eee\u60f3DOM\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u6d3b\u7528\u3057\u305f\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u958b\u767a<\/a>\u3092\u3054\u691c\u8a0e\u306e\u4f01\u696d\u69d8\u306f\u3001\u662f\u975eMMM\u306b\u3054\u76f8\u8ac7\u4e0b\u3055\u3044\u307e\u305b\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"

\u82f1\u8a9e\u306e\u52c9\u5f37\u3092\u3059\u308b\u305e\u3068\u610f\u6c17\u8fbc\u307f\u3001\u5b57\u5e55\u306a\u3057\u3067\u52d5\u753b\u3092\u89b3\u59cb\u3081\u305f\u3068\u3053\u308d\u30d5\u30e9\u30f3\u30b9\u304c\u821e\u53f0\u306e\u30c9\u30ad\u30e5\u30f3\u30bf\u30ea\u30fc\u3092\u89b3\u3066\u3044\u305f\u3053\u3068\u306b\u6c17\u4ed8\u3044\u305f\u5c0f\u98fc\u3067\u3059\u3002 React.js\u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u69cb\u7bc9\u3059\u308b\u306b\u3042\u305f\u308a\u3001\u305d\u306e\u5185\u90e8\u5b9f\u88c5\u306b\u3064\u3044\u3066\u7406\u89e3\u3057\u3066\u4f7f\u3063\u3066\u3044\u308b\u30b1\u30fc\u30b9\u306f\u5fc5\u305a\u3057\u3082\u591a\u304f\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u3002 \u7279\u306bReact.js\u306e\u60c5\u5831\u304c\u3042\u3075\u308c\u3066\u3044\u308b\u3088\u3046\u306a\u6628\u4eca\u3067\u306f\u3001\u5185\u90e8\u5b9f\u88c5\u3092\u304d\u3061\u3093\u3068\u7406\u89e3\u3057\u3088\u3046\u3068\u3059\u308b\u3053\u3068\u304c\u76f4\u63a5\u7684\u306b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u69cb\u7bc9\u306e\u751f\u7523\u6027\u306b\u5bc4\u4e0e\u3059\u308b\u3068 […]<\/p>\n","protected":false},"author":1,"featured_media":684,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[77,78],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts\/239"}],"collection":[{"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/comments?post=239"}],"version-history":[{"count":1,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts\/239\/revisions"}],"predecessor-version":[{"id":3375,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts\/239\/revisions\/3375"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/media?parent=239"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/categories?post=239"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/tags?post=239"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}