{"id":368696,"date":"2024-05-21T03:47:49","date_gmt":"2024-05-21T03:47:49","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=368696"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=368696","title":{"rendered":"<span>\u041f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 SolidJS<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 SolidJS \u2212 JavaScript-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0431\u0435\u0437 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e DOM. \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043b\u0435\u0433\u043a\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0434\u0430\u0447 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c TypeScript \u0438 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.     <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3dc\/6dc\/a93\/3dc6dca931dd91c2cae6a7d01877d7cc.png\" alt=\"SolidJS\" title=\"SolidJS\" width=\"1594\" height=\"295\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3dc\/6dc\/a93\/3dc6dca931dd91c2cae6a7d01877d7cc.png\"\/><\/p>\n<div><figcaption>SolidJS<\/figcaption><\/div>\n<\/figure>\n<h2>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 SolidJS?<\/h2>\n<p>SolidJS \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f JS \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c. \u0421\u0430\u043c\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0438\u0448\u0443\u0442 <a href=\"https:\/\/github.com\/solidjs\/solid\" rel=\"noopener noreferrer nofollow\">\u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u0433\u0438\u0442\u0445\u0430\u0431\u0435<\/a>: \u00abSolid \u2212 \u044d\u0442\u043e \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 JavaScript \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432. \u0412\u043c\u0435\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e DOM \u043e\u043d \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442 \u0441\u0432\u043e\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0437\u043b\u044b DOM \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0438\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0440\u0435\u0430\u043a\u0446\u0438\u0439\u00bb.  <\/p>\n<p>\u0423\u0436\u0435 \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0441 \u043a\u0430\u043a\u043e\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 \u0438\u0434\u0435\u0442 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 DOM. SolidJS \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 React, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u043d\u0430\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b, \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 (\u0440\u0435\u0430\u043a\u0442\u043e\u0432\u0441\u043a\u0438\u0435 \u0445\u0443\u043a\u0438), \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0430\u0440\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439.   <\/p>\n<p>\u0423 SolidJS \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u0430\u044f <a href=\"https:\/\/www.solidjs.com\/tutorial\/introduction_basics\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f <\/a>\u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u0438 \u0438\u043c\u0435\u0435\u0442 \u0440\u044f\u0434 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u043e\u0432. \u041e\u0434\u043d\u0430\u043a\u043e, \u0432 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u043c \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0435 \u043c\u0430\u043b\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u0443.  <\/p>\n<h2>\u041d\u0430\u0447\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u044b  <\/h2>\n<p>\u041d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 npm \u0438 \u0441\u0440\u0435\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 VS Code. \u0422\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0431\u043e\u0440\u0449\u0438\u043a Vite (\u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 webpack).  <\/p>\n<p>\u0412 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0430 \u043f\u0430\u043f\u043a\u0430 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c, \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443: <code>npm create vite@latest todo-list -- --template solid-ts<\/code>  <br \/>\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043d\u0430\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <strong>todo\u2011list<\/strong> \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b. <\/p>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430: <code>cd todo-list<br \/><\/code>\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432:   <code>npm install<\/code>   <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442: <code>npm run dev<\/code>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u0432\u0441\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0442\u043e \u043d\u0430 \u0430\u0434\u0440\u0435\u0441\u0435 <a href=\"http:\/\/localhost:5173\/\" rel=\"noopener noreferrer nofollow\">http:\/\/localhost:5173\/<\/a> \u0443\u0432\u0438\u0434\u0438\u043c \u044d\u0442\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443: <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c24\/7ed\/f66\/c247edf66c0c54462e18156fa865d983.png\" alt=\"\u0421\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\" title=\"\u0421\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\" width=\"1666\" height=\"821\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c24\/7ed\/f66\/c247edf66c0c54462e18156fa865d983.png\"\/><\/p>\n<div><figcaption>\u0421\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430<\/figcaption><\/div>\n<\/figure>\n<p><strong>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e<\/strong><\/p>\n<p>\u0414\u043b\u044f \u0441\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0441 \u0433\u043e\u0442\u043e\u0432\u044b\u043c\u0438 \u0441\u0442\u0438\u043b\u044f\u043c\u0438 \u2212 <a href=\"https:\/\/getbootstrap.com\/\" rel=\"noopener noreferrer nofollow\">Bootstrap<\/a>. \u0412 \u0444\u0430\u0439\u043b\u0435 index.html \u0432\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438:  <\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u043c \u0442\u0435\u0433\u043e\u043c <code>&lt;\/head><\/code>:  <\/p>\n<p><code>&lt;link href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.2.3\/dist\/css\/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65\" crossorigin=\"anonymous\"><\/code>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u043c \u0442\u0435\u0433\u043e\u043c <code>&lt;\/body><\/code>:  <\/p>\n<p><code>&lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.2.3\/dist\/js\/bootstrap.bundle.min.js\" integrity=\"sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK\/7HAuoJl+0I4\" crossorigin=\"anonymous\">&lt;\/script><\/code>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0443\u0434\u0430\u043b\u0438\u043c \u0444\u0430\u0439\u043b App.css. \u0412 index.css \u0443\u0434\u0430\u043b\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0438 \u0432\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0432\u043e\u0435:<\/p>\n<pre><code class=\"css\">:root {   font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;   line-height: 1.5;   font-weight: 400;   width: 100%;   height: 100%; }  #root {   max-width: 1280px;   margin: 0 auto;   padding: 2rem;   display: flex;   flex-flow: column nowrap;   place-items: center; }<\/code><\/pre>\n<h3>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430<\/h3>\n<p>\u041d\u0430\u0448\u0435 \u0431\u0443\u0434\u0443\u0449\u0435\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0437 \u0442\u0440\u0435\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432:<\/p>\n<ol>\n<li>\n<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u2212 \u0444\u043b\u0430\u0436\u043e\u043a \u00ab\u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430\/\u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430\u00bb \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041a\u043d\u043e\u043f\u043a\u0430 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f\/\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<\/li>\n<\/ol>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u0443 \u043d\u0430\u0441 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0432\u043e\u0442 <a href=\"https:\/\/todo-list-swart-omega.vercel.app\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0430\u043a\u043e\u0435 <\/a>\u0433\u043e\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<h2>\u041f\u0435\u0440\u0432\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b<\/h2>\n<h4>\u0417\u0430\u0434\u0430\u0447\u0430<\/h4>\n<p>\u0412 \u043f\u0430\u043f\u043a\u0435 src \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b<em> components\/task\/index.tsx <\/em>\u0438 \u0432 \u043d\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438:   <\/p>\n<pre><code class=\"javascript\">export default function Task() {   return (     &lt;div class=\"row form-check\">       &lt;input         class=\"form-check-input\"         type=\"checkbox\"         value=\"\"         id=\"flexCheckDefault\"       \/>       &lt;label class=\"form-check-label\" for=\"flexCheckDefault\">         \u0417\u0430\u0434\u0430\u0447\u0430 \u21161       &lt;\/label>     &lt;\/div>   ); }<\/code><\/pre>\n<p>\u0412 input \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u0438\u043b\u0438 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u043e\u0433\u043e \u0444\u043b\u0430\u0436\u043e\u043a, \u0430 \u0432 \u0442\u0435\u0433 label \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438. \u042d\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 (\u0434\u0430\u043b\u0435\u0435 \u2212 \u043f\u0440\u043e\u043f\u0441\u043e\u0432) \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 props (\u043a\u043e\u0434 \u043d\u0438\u0436\u0435).<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438. \u0412 \u043f\u0440\u043e\u043f\u0441\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438 \u0441\u0442\u0430\u0442\u0443\u0441 (\u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430\/\u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430). \u0417\u0434\u0435\u0441\u044c \u043d\u0430\u0441\u0442\u0443\u043f\u0430\u0435\u0442 <em>\u043f\u0435\u0440\u0432\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d<\/em>\u0442 \u0432 SolidJS.<\/p>\n<p>\u0412\u0441\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 SolidJS \u2212 \u044d\u0442\u043e \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c. \u0417\u0434\u0435\u0441\u044c \u043e\u043d\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430,\u0447\u0442\u043e\u0431\u044b \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u0437\u0430\u0434\u0430\u0447\u0438 \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u0427\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, <strong>\u043d\u0435\u043b\u044c\u0437\u044f \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 props<\/strong>, \u043a\u0430\u043a \u0432 React. \u041f\u0440\u043e\u043f\u0441\u044b \u0432 SolidJS \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0438 <strong>\u0443\u0436\u0435<\/strong> \u0438\u043c\u0435\u044e\u0442 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u043f\u0440\u0438 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0442\u0435\u0440\u044f\u044e\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 props.<\/p>\n<p>\u041d\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0437\u0430\u0434\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0442\u043e \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c? \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u043c\u0435\u0442\u043e\u0434 \u2212 <code>mergeProps<\/code>. \u0412 <code>mergeProps<\/code> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u0440\u043e\u043f\u0441\u043e\u0432 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438 \u043e\u0431\u044a\u0435\u043a\u0442 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u043f\u0440\u043e\u043f\u0441\u043e\u0432, \u0432 \u0438\u0442\u043e\u0433\u0435 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043d\u043e\u0432\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f:<\/p>\n<pre><code class=\"javascript\">import { mergeProps } from \"solid-js\";  type Props = {   name?: string;   isDone?: boolean; };  export default function Task(_props: Props) {   const props = mergeProps(     {       name: \"\u0417\u0430\u0434\u0430\u0447\u0430 \u21161\",       isDone: false,     },     _props   );   return (     &lt;div class=\"form-check\">       &lt;input         class=\"form-check-input\"         type=\"checkbox\"         value=\"\"         id=\"flexCheckDefault\"         checked={props.isDone}       \/>       &lt;label class=\"form-check-label\" for=\"flexCheckDefault\">         {props.name}       &lt;\/label>     &lt;\/div>   ); }<\/code><\/pre>\n<p> \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 App.tsx, \u0443\u0434\u0430\u043b\u0438\u043c \u0432\u0435\u0441\u044c \u043a\u043e\u0434, \u0447\u0442\u043e \u0442\u0430\u043c \u0435\u0441\u0442\u044c, \u0438 \u0432\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0432\u043e\u0439:  <\/p>\n<pre><code class=\"javascript\">import Task from \".\/components\/task\";  function App() {   return (     &lt;div>       &lt;Task \/>     &lt;\/div>   ); }  export default App;<\/code><\/pre>\n<p>\u041e\u043f\u044f\u0442\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043d\u0430 <a href=\"http:\/\/localhost:5173\/\" rel=\"noopener noreferrer nofollow\">http:\/\/localhost:5173\/<\/a> \u0438 \u0443\u0432\u0438\u0434\u0438\u043c \u043d\u0430\u0448 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (\u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0437\u0430\u043f\u0443\u0449\u0435\u043d):<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/259\/127\/907\/25912790722dfcd39067859e6790a6d9.png\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0432\u043e\u0434\u0430 \u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e\" title=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0432\u043e\u0434\u0430 \u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e\" width=\"1317\" height=\"265\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/259\/127\/907\/25912790722dfcd39067859e6790a6d9.png\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0432\u043e\u0434\u0430 \u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u041f\u043e\u043b\u0434\u0435\u043b\u0430 \u0441\u0434\u0435\u043b\u0430\u043d\u043e, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0435\u0449\u0435 \u043f\u0430\u0440\u043e\u0447\u043a\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432.<\/p>\n<h4>\u041f\u043e\u043b\u0435 \u0432\u0432\u043e\u0434\u0430 \u0437\u0430\u0434\u0430\u0447\u0438<\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b <em>components\/input-field\/index.tsx<\/em> \u0438 \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"javascript\">type Props = {   onChanged: () => void; };  export default function InputField(props: Props) {   return (     &lt;div class=\"mb-3\">       &lt;label for=\"exampleFormControlInput1\" class=\"form-label\">         \u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438       &lt;\/label>       &lt;input         type=\"email\"         class=\"form-control form-control\"         id=\"exampleFormControlInput1\"         placeholder=\"\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e...\"         onChange={props.onChanged}       \/>     &lt;\/div>   ); }<\/code><\/pre>\n<p>\u0412 input \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u0437\u0430\u0434\u0430\u0447\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u2212 <code>onChanged<\/code>. \u0412 \u044d\u0442\u043e\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435 \u0443\u0436\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043f\u0440\u043e\u043f\u0441\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>onChanged<\/code> \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.<\/p>\n<h4>\u041a\u043d\u043e\u043f\u043a\u0430 \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438  <\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0434\u0438\u043d \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0438 \u0432 \u043f\u0440\u043e\u043f\u0441\u0430\u0445 \u0431\u0443\u0434\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u0438\u043f \u043a\u043d\u043e\u043f\u043a\u0438. \u0412 \u0444\u0430\u0439\u043b\u0435 <em>components\/button\/index.tsx<\/em> \u0437\u0430\u043f\u0438\u0448\u0435\u043c:<\/p>\n<pre><code class=\"javascript\">type Props = {   name: string;   type: \"add\" | \"delete\";   onClick: () => void; };  export default function Button(props: Props) {   return (     &lt;button       type=\"button\"       class=\"btn btn-success\"       classList={{         \"btn-succes\": props.type === \"add\",         \"btn-danger\": props.type === \"delete\",       }}       onClick={props.onClick}     >       {props.name}     &lt;\/button>   ); }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u0442\u0430\u043a\u0436\u0435 \u0432 \u043f\u0440\u043e\u0441\u044b \u043f\u0440\u043e\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u043a\u043d\u043e\u043f\u043a\u0438, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u044f-\u043a\u043b\u0438\u043a \u0438 \u0442\u0438\u043f \u043a\u043d\u043e\u043f\u043a\u0438. \u0423 \u043d\u0430\u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0430 \u0442\u0438\u043f\u0430 \u043a\u043d\u043e\u043f\u043e\u043a: \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u0445 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0442\u0440\u043e\u0447\u043a\u0430\u043c\u0438 ( \u043d\u0430 \u0431\u0443\u0434\u0443\u0449\u0435\u0435 \u043b\u0443\u0447\u0448\u0435 \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443). \u0422\u0438\u043f \u043a\u043d\u043e\u043f\u043a\u0438 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0438\u043b\u0435\u0439.<\/p>\n<p>\u041a\u0430\u043a \u0432\u044b \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u0443\u0436\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, SolidJS \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0446\u0435\u043b\u044b\u0445 \u0434\u0432\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u0430: <code>class<\/code> \u0438 <code>classList<\/code>. \u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u0430, \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u2212 \u043e\u0431\u044a\u0435\u043a\u0442, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u043b\u0435\u0432\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441, \u0430 \u0441\u043f\u0440\u0430\u0432\u0430 \u2212 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 boolean, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 true \u0434\u043e\u0431\u0430\u0432\u0438\u0442 \u043a\u043b\u0430\u0441\u0441 \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0430 \u043f\u0430\u043f\u043a\u0430 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:  <\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bfa\/b18\/8ba\/bfab188badddc07f4ed45f9d13f7fb2a.png\" alt=\"\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430\" title=\"\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430\" width=\"220\" height=\"644\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bfa\/b18\/8ba\/bfab188badddc07f4ed45f9d13f7fb2a.png\"\/><\/p>\n<div><figcaption>\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0432 App:<\/p>\n<pre><code class=\"javascript\">import Button from \".\/components\/button\"; import InputField from \".\/components\/input-field\"; import Task from \".\/components\/task\";  function App() {   return (     &lt;div>       &lt;InputField onChanged={() => console.log(\"input changed\")} \/>       &lt;Button         name=\"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c\"         onClick={() => console.log(\"btn click\")}         type=\"add\"       \/>       &lt;Task \/>       &lt;Button         name=\"\u0423\u0434\u0430\u043b\u0438\u0442\u044c\"         onClick={() => console.log(\"btn click\")}         type=\"delete\"       \/>     &lt;\/div>   ); }  export default App;<\/code><\/pre>\n<p>\u041f\u043e\u043a\u0430 \u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0438 \u0441 \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c, \u043f\u043e\u0437\u0436\u0435 \u044d\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043c. <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b8f\/e72\/9f9\/b8fe729f9f2aacec219fd3d5c42be953.png\" alt=\"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435\" title=\"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435\" width=\"1310\" height=\"352\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b8f\/e72\/9f9\/b8fe729f9f2aacec219fd3d5c42be953.png\"\/><\/p>\n<div><figcaption>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u041c\u0434\u0430, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u043e, \u0441\u0435\u0439\u0447\u0430\u0441 \u044d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043c.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0444\u0430\u0439\u043b <em>components\/task-row\/index.tsx<\/em> \u0441 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u043a\u043d\u043e\u043f\u043a\u0438 \u00ab\u0423\u0434\u0430\u043b\u0438\u0442\u044c\u00bb \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435:<\/p>\n<pre><code class=\"javascript\">import Button from \"..\/button\"; import Task from \"..\/task\";  export default function TaskRow() {   return (     &lt;div class=\"d-flex flex-row justify-content-between align-items-center gap-3\">       &lt;div class=\"flex-grow-1\">         &lt;Task \/>       &lt;\/div>        &lt;Button         name=\"\u0423\u0434\u0430\u043b\u0438\u0442\u044c\"         onClick={() => console.log(\"btn click\")}         type=\"delete\"       \/>     &lt;\/div>   ); }<\/code><\/pre>\n<p> \u0418 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 App \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u0433\u043e\u0432:  <\/p>\n<pre><code class=\"javascript\">import Button from \".\/components\/button\"; import InputField from \".\/components\/input-field\"; import TaskRow from \".\/components\/task-row\";  function App() {   return (     &lt;div class=\"container\">       &lt;div class=\"d-flex flex-row justify-content-between align-items-center gap-3\">         &lt;div class=\"flex-grow-1\">           &lt;InputField onChanged={() => console.log(\"input changed\")} \/>         &lt;\/div>          &lt;div class=\"mt-3\">           &lt;Button             name=\"+ \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c\"             onClick={() => console.log(\"btn click\")}             type=\"add\"           \/>         &lt;\/div>       &lt;\/div>        &lt;div class=\"mb-3 d-flex flex-column gap-3\">         &lt;TaskRow \/>       &lt;\/div>     &lt;\/div>   ); }  export default App;<\/code><\/pre>\n<p> \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043e\u043f\u0440\u044f\u0442\u043d\u043e:  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c99\/b3f\/822\/c99b3f822947f3a9d46a865b0b9e47df.png\" alt=\"\u041d\u0430\u0448 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043b\u0435\u0433\u043a\u043e\u0439 \u0441\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u0438\" title=\"\u041d\u0430\u0448 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043b\u0435\u0433\u043a\u043e\u0439 \u0441\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u0438\" width=\"1529\" height=\"278\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c99\/b3f\/822\/c99b3f822947f3a9d46a865b0b9e47df.png\"\/><\/p>\n<div><figcaption>\u041d\u0430\u0448 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043b\u0435\u0433\u043a\u043e\u0439 \u0441\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/figcaption><\/div>\n<\/figure>\n<h3>\u041f\u0435\u0440\u0432\u0430\u044f \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u043c\u0443 \u2212 \u043b\u043e\u0433\u0438\u043a\u0430 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<p>\u0412 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435 App \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0438\u0433\u043d\u0430\u043b \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043d\u0430\u0448\u0438\u0445 \u0437\u0430\u0434\u0430\u0447 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0442\u0438\u043f ITask:<\/p>\n<pre><code class=\"javascript\">import { createSignal } from \"solid-js\"; ...  export interface ITask {   id: number;   name: string;   isDone: boolean; }  function App() {   const [tasks, setTasks] = createSignal&lt;ITask[]>([]);   const [taskId, setTaskId] = createSignal(0);   const [newTask, setNewTask] = createSignal(\"\"); ...<\/code><\/pre>\n<p>\u0412\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 createSignal \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0430\u0440\u0443: \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 + \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f (\u0442\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439 useState). \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u043d\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u044b \u043a \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c \u0438 \u044d\u0442\u0438 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0434 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c App.   <\/p>\n<p>\u041c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>tasks \u2212 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0437\u0430\u0434\u0430\u0447,<\/p>\n<\/li>\n<li>\n<p>taskId \u2212 \u0438\u043d\u0434\u0435\u043a\u0441 \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 (\u044d\u0442\u043e\u0442 \u0441\u0438\u0433\u043d\u0430\u043b \u0434\u043b\u044f \u0443\u0447\u0435\u0431\u043d\u044b\u0445 \u0446\u0435\u043b\u0435\u0439, \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0438 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e),<\/p>\n<\/li>\n<li>\n<p>newTask \u2212 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438<\/strong> \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 App.tsx \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c:  <\/p>\n<pre><code class=\"javascript\">function App() {   ...   const handleAddClick = () => {     if (newTask()) {       setTasks([...tasks(), { id: taskId(), name: newTask(), isDone: false }]);       setTaskId((prev) => prev + 1);       setNewTask(\"\");     }   }; ...   return (     &lt;div class=\"container\">       &lt;div class=\"d-flex flex-row justify-content-between align-items-center gap-3\">         &lt;div class=\"flex-grow-1\">           &lt;InputField             value={newTask()}             onChanged={(value: string) => setNewTask(value)}           \/>         &lt;\/div> &lt;div class=\"mt-3\">           &lt;Button name=\"+ \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c\" onClick={handleAddClick} type=\"add\" \/>         &lt;\/div> ... )}<\/code><\/pre>\n<p>\u0412 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 newTask, \u0432\u044b\u0437\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0433\u0435\u0442\u0442\u0435\u0440-\u043c\u0435\u0442\u043e\u0434\u0430 (<em>\u0432\u0441\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u0432 SolidJS \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u0440\u0443\u0433\u043b\u044b\u0445 \u0441\u043a\u043e\u0431\u043e\u043a => newTask()<\/em>). \u0415\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u043d\u0435\u043f\u0443\u0441\u0442\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430, \u0442\u043e \u0432 setTasks \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0432 \u043a\u043e\u043d\u0435\u0446 \u0441\u043f\u0438\u0441\u043a\u0430 tasks, \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441 \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u043e\u0447\u0438\u0449\u0430\u0435\u043c \u043f\u043e\u043b\u0435 newTasks.  <\/p>\n<p>\u0414\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u0435\u0442\u0442\u0435\u0440\u044b(\u043c\u0435\u0442\u043e\u0434\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438), \u043a\u0430\u043a <code>setTaskId<\/code>. \u0412\u043d\u0443\u0442\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (\u043a\u0430\u043a \u0432 <code>setTasks<\/code>) \u0438\u043b\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0448\u043b\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435:  <code>setTaskId((prev) => prev + 1)<\/code>.<\/p>\n<p>\u041e\u0431\u043d\u043e\u0432\u0438\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 InputField:<\/p>\n<pre><code class=\"javascript\">import type { JSX } from \"solid-js\";  type Props = {   value: string;   onChanged: (value: string) => void; };  export default function InputField(props: Props) {   const handleOnChanged: JSX.EventHandler&lt;HTMLInputElement, Event> = (     e: Event   ) => {     const target = e.target as HTMLInputElement;     if (target) props.onChanged(target.value);   };    return (     &lt;div class=\"mb-3\">       &lt;label for=\"exampleFormControlInput1\" class=\"form-label\">         \u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438       &lt;\/label>       &lt;input         type=\"email\"         class=\"form-control form-control\"         id=\"exampleFormControlInput1\"         placeholder=\"\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e...\"         value={props.value}         onChange={handleOnChanged}       \/>     &lt;\/div>   ); }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0438 \u043f\u0440\u043e\u043f\u0441\u044b \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0437 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 DOM \u044d\u043b\u0435\u043c\u0435\u043d\u0442 input (e.target) \u0438 \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0432 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u0443\u044e \u0447\u0435\u0440\u0435\u0437 props.<\/p>\n<p><strong>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435.<\/strong> \u0412 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435 App \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<pre><code class=\"javascript\">const handleDeleteClick = (id: number) => {     setTasks(tasks().filter((item) => item.id !== id)); };<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u0438, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0432 \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u0442\u0435 \u0437\u0430\u0434\u0430\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0440\u0430\u0432\u043d\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0438\u043d\u0434\u0435\u043a\u0441\u0443.<\/p>\n<p>\u0410 \u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435 TaskRow \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 id \u0437\u0430\u0434\u0430\u0447\u0438 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e:  <\/p>\n<pre><code class=\"javascript\">import { ITask } from \"..\/..\/App\"; import Button from \"..\/button\"; import Task from \"..\/task\";  type Props = {   task: ITask;   onDeleteClick: (id: number) => void; };  export default function TaskRow(props: Props) {   const handleDeleteClick = () => {     props.onDeleteClick(props.task.id);   };    return (     &lt;div class=\"d-flex flex-row justify-content-between align-items-center gap-3\">       &lt;div class=\"flex-grow-1\">         &lt;Task name={props.task.name} isDone={props.task.isDone} \/>       &lt;\/div>        &lt;Button name=\"\u0423\u0434\u0430\u043b\u0438\u0442\u044c\" onClick={handleDeleteClick} type=\"delete\" \/>     &lt;\/div>   ); }<\/code><\/pre>\n<p>\u041d\u0443 \u0438 \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u2212 \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u0442\u0435\u0433\u043e\u043c <em>For<\/em> \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0433\u043e \u0432 App \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u0442\u0440\u043e\u0447\u043a\u0438 &lt;TaskRow \/>:<\/p>\n<pre><code class=\"javascript\">&lt;For each={tasks()}> {(item, _index) => &lt;TaskRow task={item} onDeleteClick={handleDeleteClick} \/>} &lt;\/For><\/code><\/pre>\n<p>\u0412 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>each<\/code> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432, \u043f\u043e\u0442\u043e\u043c, \u043a\u0430\u043a \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 map, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438 \u0438\u043d\u0434\u0435\u043a\u0441. \u0422\u043e\u043b\u044c\u043a\u043e \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 index \u0431\u0443\u0434\u0435\u0442 \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c \u0434\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. <\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u0447\u0435\u043c\u0443 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e For \u0434\u043b\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432?<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0412 SolidJS \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 For, \u043d\u0435\u0436\u0435\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 map, \u043f\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438. \u0413\u043e\u0442\u043e\u0432\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0435 \u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c. <\/p>\n<\/div>\n<\/details>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043d\u0430 \u043d\u0430\u0448 \u0441\u0430\u0439\u0442, \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0434\u0430\u0447 \u043f\u0443\u0441\u0442\u043e\u0439. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e61\/631\/387\/e61631387cc5542b8cc8a86e760f903c.png\" alt=\"\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u0434\u0430\u0447\u0443\" title=\"\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u0434\u0430\u0447\u0443\" width=\"1554\" height=\"387\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e61\/631\/387\/e61631387cc5542b8cc8a86e760f903c.png\"\/><\/p>\n<div><figcaption>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u0434\u0430\u0447\u0443<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/250\/3ef\/615\/2503ef6158426581a9083cf8ba5f09a0.png\" alt=\"\u0414\u043e\u0431\u0430\u0432\u0438\u043b\u0430\u0441\u044c :)\" title=\"\u0414\u043e\u0431\u0430\u0432\u0438\u043b\u0430\u0441\u044c :)\" width=\"1521\" height=\"278\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/250\/3ef\/615\/2503ef6158426581a9083cf8ba5f09a0.png\"\/><\/p>\n<div><figcaption>\u0414\u043e\u0431\u0430\u0432\u0438\u043b\u0430\u0441\u044c \ud83d\ude42<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u0440\u043e\u0434\u0435 \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442!<\/p>\n<p>\u041d\u0443 \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u0434\u043e\u0431\u0430\u0432\u0438\u043c <strong>\u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0437\u0430\u0434\u0430\u0447\u0438.<\/strong><\/p>\n<p>\u0412 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435 Task \u043e\u0431\u043d\u043e\u0432\u0438\u043c \u043f\u0440\u043e\u043f\u0441\u044b, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a:<\/p>\n<pre><code class=\"typescript\">type Props = {   name: string;   isDone: boolean;   onIsDoneChanged: () => void; };<\/code><\/pre>\n<p> \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 input \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>onChange<\/code> \u0438 \u043d\u0430\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438\u0437 \u043f\u0440\u043e\u043f\u0441\u043e\u0432:  <\/p>\n<pre><code class=\"javascript\">&lt;input    ...   onChange={props.onIsDoneChanged} \/><\/code><\/pre>\n<p> \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0432\u0435\u0434\u0435\u043c <s>\u0437\u0430\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0439<\/s> \u0442\u0435\u043a\u0441\u0442, \u0435\u0441\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430:  <\/p>\n<pre><code class=\"javascript\">&lt;label class=\"form-check-label\" for=\"flexCheckDefault\"> &lt;Show when={props.isDone} fallback={props.name}> &lt;del>{props.name}&lt;\/del> &lt;\/Show> &lt;\/label><\/code><\/pre>\n<p><em>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044f \u043e\u0431 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445 SolidJS<\/em> \u2212 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 Show. \u042d\u0442\u043e\u0442 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445 (\u0445\u043e\u0442\u044f SolidJS \u0437\u043d\u0430\u0435\u0442 \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 &amp;&amp;, \u043d\u043e \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0441\u043e\u0432\u0435\u0442\u0443\u044e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442).<\/p>\n<p>\u041f\u0440\u043e\u043f\u0441 <code>fallback<\/code> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>else<\/code> \u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u043b\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u043b\u0438 \u0432 <code>when<\/code> \u0432\u0435\u0440\u043d\u0435\u0442 false \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0412 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435 TaskRow \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043f\u0440\u043e\u043f\u0441\u044b:<\/p>\n<pre><code class=\"javascript\">type Props = {   task: ITask;   onDeleteClick: (id: number) => void;   onIsDoneChanged: (id: number) => void; };  export default function TaskRow(props: Props) {   ...   const handleIsDoneChanged = () => {     props.onIsDoneChanged(props.task.id);   };   return (     ...       &lt;Task           name={props.task.name}           isDone={props.task.isDone}           onIsDoneChanged={handleIsDoneChanged}       \/> ...<\/code><\/pre>\n<p>\u041d\u0443 \u0438 \u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435 App \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u0441\u044e \u043e\u0441\u0442\u0430\u0432\u0448\u0443\u044e\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0443:  <\/p>\n<pre><code class=\"javascript\">function App() {   ...   const handleIsDoneChanged = (id: number) => {     setTasks(       tasks().map((task) =>         task.id !== id ? task : { ...task, isDone: !task.isDone }       )     );   };    return ( ...       &lt;TaskRow task={item}           onDeleteClick={handleDeleteClick}           onIsDoneChanged={handleIsDoneChanged}          \/>   ...       <\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0a2\/c77\/e71\/0a2c77e716e4aed845039aee2fc3c7b8.png\" alt=\"\u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u0447\u0435\u043a\u0431\u043e\u043a\u0441 \u0438 \u0437\u0430\u0434\u0430\u0447\u0430 \u0437\u0430\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u0430\" title=\"\u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u0447\u0435\u043a\u0431\u043e\u043a\u0441 \u0438 \u0437\u0430\u0434\u0430\u0447\u0430 \u0437\u0430\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u0430\" width=\"1188\" height=\"274\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0a2\/c77\/e71\/0a2c77e716e4aed845039aee2fc3c7b8.png\"\/><\/p>\n<div><figcaption>\u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u0447\u0435\u043a\u0431\u043e\u043a\u0441 \u0438 \u0437\u0430\u0434\u0430\u0447\u0430 \u0437\u0430\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e, \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e!<\/p>\n<h2>\u0415\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438<\/h2>\n<p>\u0414\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0437\u0430\u0434\u0430\u0447 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u0438\u0433\u043d\u0430\u043b \u0441 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c, \u0445\u043e\u0442\u044f \u043a\u0430\u0436\u0434\u0430\u044f \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0412\u043b\u043e\u0436\u0435\u043d\u043d\u0430\u044f \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0432 SolidJS \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 <code>createStore<\/code>. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0435\u0433\u043e \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0437\u0430\u0434\u0430\u0447, \u0432\u043c\u0435\u0441\u0442\u043e createSignal \u0434\u043b\u044f tasks \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"javascript\">const [store, setStore] = createStore([] as ITask[]);<\/code><\/pre>\n<p> \u041e\u0431\u043d\u043e\u0432\u0438\u043c \u0432\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 App:   <\/p>\n<pre><code class=\"javascript\">const handleAddClick = () => {     if (newTask()) {       setStore((t) => [...t, { id: taskId(), name: newTask(), isDone: false }]);       setTaskId((prev) => prev + 1);       setNewTask(\"\");     }   };    const handleDeleteClick = (id: number) => {     setStore((t) => t.filter((item) => item.id !== id));   };    const handleIsDoneChanged = (id: number) => {     setStore(       (todo) => todo.id === id,       \"isDone\",       (isDone) => !isDone     );   };<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 <code>handleAddClick<\/code> \u0438 <code>handleDeleteClick<\/code> \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043a\u0430\u043a \u0431\u044b\u043b\u043e, \u0430 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <code>handleIsDoneChanged<\/code> \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043d\u0430\u0448\u0443 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c. \u0412 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>setStore<\/code> \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0432\u0442\u043e\u0440\u044b\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u2212 \u043f\u043e\u043b\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u2212 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u043e\u043b\u044f. \u041d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u043e \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442!<\/p>\n<p>\u0418 \u0432 \u0442\u0435\u0433 For \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c \u043d\u0430\u0448 \u0441\u0442\u043e\u0440:  <\/p>\n<pre><code class=\"javascript\">&lt;For each={store}> {(item, _index) => (   &lt;TaskRow     task={item}         onDeleteClick={handleDeleteClick}         onIsDoneChanged={handleIsDoneChanged}      \/> )} &lt;\/For><\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0432\u0441\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u043c SolidJS \u0438 \u0434\u043e\u0431\u0438\u043b\u0438\u0441\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0432 \u043d\u0430\u0448\u0438\u0445 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447\u0430\u0445.<\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0435\u0441\u0442\u044c \u0432 <a href=\"https:\/\/github.com\/Tatiana-Polonskaya\/todo-list\" rel=\"noopener noreferrer nofollow\">git-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/a>, \u0430 \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d <a href=\"https:\/\/todo-list-swart-omega.vercel.app\/\" rel=\"noopener noreferrer nofollow\">\u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435<\/a>.<\/p>\n<hr\/>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043b\u0438\u0448\u044c \u0447\u0430\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043d\u043e, \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 SolidJS \u0441\u0442\u0430\u043b\u0430 \u0434\u043b\u044f \u0432\u0430\u0441 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0439 \ud83d\ude42 \u041f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u044b.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/794903\/\"> https:\/\/habr.com\/ru\/articles\/794903\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 SolidJS \u2212 JavaScript-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0431\u0435\u0437 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e DOM. \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043b\u0435\u0433\u043a\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0434\u0430\u0447 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c TypeScript \u0438 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.     <\/p>\n<figure class=\"full-width\">\n<div><figcaption>SolidJS<\/figcaption><\/div>\n<\/figure>\n<h2>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 SolidJS?<\/h2>\n<p>SolidJS \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f JS \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c. \u0421\u0430\u043c\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0438\u0448\u0443\u0442 <a href=\"https:\/\/github.com\/solidjs\/solid\" rel=\"noopener noreferrer nofollow\">\u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u0433\u0438\u0442\u0445\u0430\u0431\u0435<\/a>: \u00abSolid \u2212 \u044d\u0442\u043e \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 JavaScript \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432. \u0412\u043c\u0435\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e DOM \u043e\u043d \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442 \u0441\u0432\u043e\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0437\u043b\u044b DOM \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0438\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0440\u0435\u0430\u043a\u0446\u0438\u0439\u00bb.  <\/p>\n<p>\u0423\u0436\u0435 \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0441 \u043a\u0430\u043a\u043e\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 \u0438\u0434\u0435\u0442 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 DOM. SolidJS \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 React, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u043d\u0430\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b, \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 (\u0440\u0435\u0430\u043a\u0442\u043e\u0432\u0441\u043a\u0438\u0435 \u0445\u0443\u043a\u0438), \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0430\u0440\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439.   <\/p>\n<p>\u0423 SolidJS \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u0430\u044f <a href=\"https:\/\/www.solidjs.com\/tutorial\/introduction_basics\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f <\/a>\u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u0438 \u0438\u043c\u0435\u0435\u0442 \u0440\u044f\u0434 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u043e\u0432. \u041e\u0434\u043d\u0430\u043a\u043e, \u0432 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u043c \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0435 \u043c\u0430\u043b\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u0443.  <\/p>\n<h2>\u041d\u0430\u0447\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u044b  <\/h2>\n<p>\u041d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 npm \u0438 \u0441\u0440\u0435\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 VS Code. \u0422\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0431\u043e\u0440\u0449\u0438\u043a Vite (\u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 webpack).  <\/p>\n<p>\u0412 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0430 \u043f\u0430\u043f\u043a\u0430 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c, \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443: <code>npm create vite@latest todo-list -- --template solid-ts<\/code>  <br \/>\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043d\u0430\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <strong>todo\u2011list<\/strong> \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b. <\/p>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430: <code>cd todo-list<br \/><\/code>\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432:   <code>npm install<\/code>   <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442: <code>npm run dev<\/code>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u0432\u0441\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0442\u043e \u043d\u0430 \u0430\u0434\u0440\u0435\u0441\u0435 <a href=\"http:\/\/localhost:5173\/\" rel=\"noopener noreferrer nofollow\">http:\/\/localhost:5173\/<\/a> \u0443\u0432\u0438\u0434\u0438\u043c \u044d\u0442\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443: <\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430<\/figcaption><\/div>\n<\/figure>\n<p><strong>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e<\/strong><\/p>\n<p>\u0414\u043b\u044f \u0441\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0441 \u0433\u043e\u0442\u043e\u0432\u044b\u043c\u0438 \u0441\u0442\u0438\u043b\u044f\u043c\u0438 \u2212 <a href=\"https:\/\/getbootstrap.com\/\" rel=\"noopener noreferrer nofollow\">Bootstrap<\/a>. \u0412 \u0444\u0430\u0439\u043b\u0435 index.html \u0432\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438:  <\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u043c \u0442\u0435\u0433\u043e\u043c <code>&lt;\/head><\/code>:  <\/p>\n<p><code>&lt;link href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.2.3\/dist\/css\/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65\" crossorigin=\"anonymous\"><\/code>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u043c \u0442\u0435\u0433\u043e\u043c <code>&lt;\/body><\/code>:  <\/p>\n<p><code>&lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.2.3\/dist\/js\/bootstrap.bundle.min.js\" integrity=\"sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK\/7HAuoJl+0I4\" crossorigin=\"anonymous\">&lt;\/script><\/code>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0443\u0434\u0430\u043b\u0438\u043c \u0444\u0430\u0439\u043b App.css. \u0412 index.css \u0443\u0434\u0430\u043b\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0438 \u0432\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0432\u043e\u0435:<\/p>\n<pre><code class=\"css\">:root {   font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;   line-height: 1.5;   font-weight: 400;   width: 100%;   height: 100%; }  #root {   max-width: 1280px;   margin: 0 auto;   padding: 2rem;   display: flex;   flex-flow: column nowrap;   place-items: center; }<\/code><\/pre>\n<h3>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430<\/h3>\n<p>\u041d\u0430\u0448\u0435 \u0431\u0443\u0434\u0443\u0449\u0435\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0437 \u0442\u0440\u0435\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432:<\/p>\n<ol>\n<li>\n<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u2212 \u0444\u043b\u0430\u0436\u043e\u043a \u00ab\u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430\/\u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430\u00bb \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041a\u043d\u043e\u043f\u043a\u0430 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f\/\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<\/li>\n<\/ol>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u0443 \u043d\u0430\u0441 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0432\u043e\u0442 <a href=\"https:\/\/todo-list-swart-omega.vercel.app\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0430\u043a\u043e\u0435 <\/a>\u0433\u043e\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<h2>\u041f\u0435\u0440\u0432\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b<\/h2>\n<h4>\u0417\u0430\u0434\u0430\u0447\u0430<\/h4>\n<p>\u0412 \u043f\u0430\u043f\u043a\u0435 src \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b<em> components\/task\/index.tsx <\/em>\u0438 \u0432 \u043d\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438:   <\/p>\n<pre><code class=\"javascript\">export default function Task() {   return (     &lt;div class=\"row form-check\">       &lt;input         class=\"form-check-input\"         type=\"checkbox\"         value=\"\"         id=\"flexCheckDefault\"       \/>       &lt;label class=\"form-check-label\" for=\"flexCheckDefault\">         \u0417\u0430\u0434\u0430\u0447\u0430 \u21161       &lt;\/label>     &lt;\/div>   ); }<\/code><\/pre>\n<p>\u0412 input \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u0438\u043b\u0438 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u043e\u0433\u043e \u0444\u043b\u0430\u0436\u043e\u043a, \u0430 \u0432 \u0442\u0435\u0433 label \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438. \u042d\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 (\u0434\u0430\u043b\u0435\u0435 \u2212 \u043f\u0440\u043e\u043f\u0441\u043e\u0432) \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 props (\u043a\u043e\u0434 \u043d\u0438\u0436\u0435).<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438. \u0412 \u043f\u0440\u043e\u043f\u0441\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438 \u0441\u0442\u0430\u0442\u0443\u0441 (\u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430\/\u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430). \u0417\u0434\u0435\u0441\u044c \u043d\u0430\u0441\u0442\u0443\u043f\u0430\u0435\u0442 <em>\u043f\u0435\u0440\u0432\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d<\/em>\u0442 \u0432 SolidJS.<\/p>\n<p>\u0412\u0441\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 SolidJS \u2212 \u044d\u0442\u043e \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c. \u0417\u0434\u0435\u0441\u044c \u043e\u043d\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430,\u0447\u0442\u043e\u0431\u044b \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u0437\u0430\u0434\u0430\u0447\u0438 \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u0427\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, <strong>\u043d\u0435\u043b\u044c\u0437\u044f \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 props<\/strong>, \u043a\u0430\u043a \u0432 React. \u041f\u0440\u043e\u043f\u0441\u044b \u0432 SolidJS \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0438 <strong>\u0443\u0436\u0435<\/strong> \u0438\u043c\u0435\u044e\u0442 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u043f\u0440\u0438 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0442\u0435\u0440\u044f\u044e\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 props.<\/p>\n<p>\u041d\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0437\u0430\u0434\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0442\u043e \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c? \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u043c\u0435\u0442\u043e\u0434 \u2212 <code>mergeProps<\/code>. \u0412 <code>mergeProps<\/code> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u0440\u043e\u043f\u0441\u043e\u0432 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438 \u043e\u0431\u044a\u0435\u043a\u0442 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u043f\u0440\u043e\u043f\u0441\u043e\u0432, \u0432 \u0438\u0442\u043e\u0433\u0435 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043d\u043e\u0432\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f:<\/p>\n<pre><code class=\"javascript\">import { mergeProps } from \"solid-js\";  type Props = {   name?: string;   isDone?: boolean; };  export default function Task(_props: Props) {   const props = mergeProps(     {       name: \"\u0417\u0430\u0434\u0430\u0447\u0430 \u21161\",       isDone: false,     },     _props   );   return (     &lt;div class=\"form-check\">       &lt;input         class=\"form-check-input\"         type=\"checkbox\"         value=\"\"         id=\"flexCheckDefault\"         checked={props.isDone}       \/>       &lt;label class=\"form-check-label\" for=\"flexCheckDefault\">         {props.name}       &lt;\/label>     &lt;\/div>   ); }<\/code><\/pre>\n<p> \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 App.tsx, \u0443\u0434\u0430\u043b\u0438\u043c \u0432\u0435\u0441\u044c \u043a\u043e\u0434, \u0447\u0442\u043e \u0442\u0430\u043c \u0435\u0441\u0442\u044c, \u0438 \u0432\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0432\u043e\u0439:  <\/p>\n<pre><code class=\"javascript\">import Task from \".\/components\/task\";  function App() {   return (     &lt;div>       &lt;Task \/>     &lt;\/div>   ); }  export default App;<\/code><\/pre>\n<p>\u041e\u043f\u044f\u0442\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043d\u0430 <a href=\"http:\/\/localhost:5173\/\" rel=\"noopener noreferrer nofollow\">http:\/\/localhost:5173\/<\/a> \u0438 \u0443\u0432\u0438\u0434\u0438\u043c \u043d\u0430\u0448 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (\u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0437\u0430\u043f\u0443\u0449\u0435\u043d):<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0432\u043e\u0434\u0430 \u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u041f\u043e\u043b\u0434\u0435\u043b\u0430 \u0441\u0434\u0435\u043b\u0430\u043d\u043e, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0435\u0449\u0435 \u043f\u0430\u0440\u043e\u0447\u043a\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432.<\/p>\n<h4>\u041f\u043e\u043b\u0435 \u0432\u0432\u043e\u0434\u0430 \u0437\u0430\u0434\u0430\u0447\u0438<\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b <em>components\/input-field\/index.tsx<\/em> \u0438 \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"javascript\">type Props = {   onChanged: () => void; };  export default function InputField(props: Props) {   return (     &lt;div class=\"mb-3\">       &lt;label for=\"exampleFormControlInput1\" class=\"form-label\">         \u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438       &lt;\/label>       &lt;input         type=\"email\"         class=\"form-control form-control\"         id=\"exampleFormControlInput1\"         placeholder=\"\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e...\"         onChange={props.onChanged}       \/>     &lt;\/div>   ); }<\/code><\/pre>\n<p>\u0412 input \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u0437\u0430\u0434\u0430\u0447\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u2212 <code>onChanged<\/code>. \u0412 \u044d\u0442\u043e\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435 \u0443\u0436\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043f\u0440\u043e\u043f\u0441\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>onChanged<\/code> \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.<\/p>\n<h4>\u041a\u043d\u043e\u043f\u043a\u0430 \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438  <\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0434\u0438\u043d \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0438 \u0432 \u043f\u0440\u043e\u043f\u0441\u0430\u0445 \u0431\u0443\u0434\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u0438\u043f \u043a\u043d\u043e\u043f\u043a\u0438. \u0412 \u0444\u0430\u0439\u043b\u0435 <em>components\/button\/index.tsx<\/em> \u0437\u0430\u043f\u0438\u0448\u0435\u043c:<\/p>\n<pre><code class=\"javascript\">type Props = {   name: string;   type: \"add\" | \"delete\";   onClick: () => void; };  export default function Button(props: Props) {   return (     &lt;button       type=\"button\"       class=\"btn btn-success\"       classList={{         \"btn-succes\": props.type === \"add\",         \"btn-danger\": props.type === \"delete\",       }}       onClick={props.onClick}     >       {props.name}     &lt;\/button>   ); }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u0442\u0430\u043a\u0436\u0435 \u0432 \u043f\u0440\u043e\u0441\u044b \u043f\u0440\u043e\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u043a\u043d\u043e\u043f\u043a\u0438, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u044f-\u043a\u043b\u0438\u043a \u0438 \u0442\u0438\u043f \u043a\u043d\u043e\u043f\u043a\u0438. \u0423 \u043d\u0430\u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0430 \u0442\u0438\u043f\u0430 \u043a\u043d\u043e\u043f\u043e\u043a: \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u0445 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0442\u0440\u043e\u0447\u043a\u0430\u043c\u0438 ( \u043d\u0430 \u0431\u0443\u0434\u0443\u0449\u0435\u0435 \u043b\u0443\u0447\u0448\u0435 \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443). \u0422\u0438\u043f \u043a\u043d\u043e\u043f\u043a\u0438 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0438\u043b\u0435\u0439.<\/p>\n<p>\u041a\u0430\u043a \u0432\u044b \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u0443\u0436\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, SolidJS \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0446\u0435\u043b\u044b\u0445 \u0434\u0432\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u0430: <code>class<\/code> \u0438 <code>classList<\/code>. \u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u0430, \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u2212 \u043e\u0431\u044a\u0435\u043a\u0442, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u043b\u0435\u0432\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441, \u0430 \u0441\u043f\u0440\u0430\u0432\u0430 \u2212 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 boolean, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 true \u0434\u043e\u0431\u0430\u0432\u0438\u0442 \u043a\u043b\u0430\u0441\u0441 \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0430 \u043f\u0430\u043f\u043a\u0430 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:  <\/p>\n<figure class=\"\">\n<div><figcaption>\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0432 App:<\/p>\n<pre><code class=\"javascript\">import Button from \".\/components\/button\"; import InputField from \".\/components\/input-field\"; import Task from \".\/components\/task\";  function App() {   return (     &lt;div>       &lt;InputField onChanged={() => console.log(\"input changed\")} \/>       &lt;Button         name=\"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c\"         onClick={() => console.log(\"btn click\")}         type=\"add\"       \/>       &lt;Task \/>       &lt;Button         name=\"\u0423\u0434\u0430\u043b\u0438\u0442\u044c\"         onClick={() => console.log(\"btn click\")}         type=\"delete\"       \/>     &lt;\/div>   ); }  export default App;<\/code><\/pre>\n<p>\u041f\u043e\u043a\u0430 \u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0438 \u0441 \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c, \u043f\u043e\u0437\u0436\u0435 \u044d\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043c. <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u041c\u0434\u0430, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u043e, \u0441\u0435\u0439\u0447\u0430\u0441 \u044d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043c.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0444\u0430\u0439\u043b <em>components\/task-row\/index.tsx<\/em> \u0441 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u043a\u043d\u043e\u043f\u043a\u0438 \u00ab\u0423\u0434\u0430\u043b\u0438\u0442\u044c\u00bb \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435:<\/p>\n<pre><code class=\"javascript\">import Button from \"..\/button\"; import Task from \"..\/task\";  export default function TaskRow() {   return (     &lt;div class=\"d-flex flex-row justify-content-between align-items-center gap-3\">       &lt;div class=\"flex-grow-1\">         &lt;Task \/>       &lt;\/div>        &lt;Button         name=\"\u0423\u0434\u0430\u043b\u0438\u0442\u044c\"         onClick={() => console.log(\"btn click\")}         type=\"delete\"       \/>     &lt;\/div>   ); }<\/code><\/pre>\n<p> \u0418 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 App \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u0433\u043e\u0432:  <\/p>\n<pre><code class=\"javascript\">import Button from \".\/components\/button\"; import InputField from \".\/components\/input-field\"; import TaskRow from \".\/components\/task-row\";  function App() {   return (     &lt;div class=\"container\">       &lt;div class=\"d-flex flex-row justify-content-between align-items-center gap-3\">         &lt;div class=\"flex-grow-1\">           &lt;InputField onChanged={() => console.log(\"input changed\")} \/>         &lt;\/div>          &lt;div class=\"mt-3\">           &lt;Button             name=\"+ \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c\"             onClick={() => console.log(\"btn click\")}             type=\"add\"           \/>         &lt;\/div>       &lt;\/div>        &lt;div class=\"mb-3 d-flex flex-column gap-3\">         &lt;TaskRow \/>       &lt;\/div>     &lt;\/div>   ); }  export default App;<\/code><\/pre>\n<p> \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043e\u043f\u0440\u044f\u0442\u043d\u043e:  <\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041d\u0430\u0448 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043b\u0435\u0433\u043a\u043e\u0439 \u0441\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/figcaption><\/div>\n<\/figure>\n<h3>\u041f\u0435\u0440\u0432\u0430\u044f \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u043c\u0443 \u2212 \u043b\u043e\u0433\u0438\u043a\u0430 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<p>\u0412 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435 App \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0438\u0433\u043d\u0430\u043b \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043d\u0430\u0448\u0438\u0445 \u0437\u0430\u0434\u0430\u0447 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0442\u0438\u043f ITask:<\/p>\n<pre><code class=\"javascript\">import { createSignal } from \"solid-js\"; ...  export interface ITask {   id: number;   name: string;   isDone: boolean; }  function App() {   const [tasks, setTasks] =<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-368696","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/368696","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=368696"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/368696\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=368696"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=368696"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=368696"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}