Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Game Widget Library using React
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Yosuke Furukawa
PRO
March 01, 2016
Programming
1.7k
0
Share
Game Widget Library using React
React meetup 第三回の発表資料です
Yosuke Furukawa
PRO
March 01, 2016
More Decks by Yosuke Furukawa
See All by Yosuke Furukawa
デザインシステムが必須の時代に
yosuke_furukawa
PRO
2
220
Node.js, Deno, Bun 最新動向とその所感について
yosuke_furukawa
PRO
10
5.1k
Welcome JSConf.jp 2024
yosuke_furukawa
PRO
1
4.7k
tc39 x jsconf.jp Panel Discussion 2024
yosuke_furukawa
PRO
0
340
Removing Corepack
yosuke_furukawa
PRO
9
1.9k
JavaScript Runtime とはなにか
yosuke_furukawa
PRO
15
3.1k
Strip Types と Storage
yosuke_furukawa
PRO
4
500
Module Harmony について
yosuke_furukawa
PRO
4
1.9k
LTのやり方
yosuke_furukawa
PRO
16
2.9k
Other Decks in Programming
See All in Programming
Agentic UI in the Frontend: Architectures with Open Standards @JAX 2026 in Mainz
manfredsteyer
PRO
0
120
iOS26時代の新規アプリ開発
yuukiw00w
0
160
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
460
1人1案件のプロダクトエンジニア時代に、"プロセス監督"としてチャレンジしたこと
non0113
0
120
AI Agent と正しく分析するための環境作り
yoshyum
2
550
Agentic Elixir
whatyouhide
0
460
Back to the roots of date
jinroq
0
900
20年以上続くプロダクトでも使い続けられる静的解析ツールを求めて
matsuo_atsushi
0
150
KMP × Kotlin 2.3 - How Android Got Slower While iOS Builds Improved by 47%
rio432
0
230
PHPでバイナリをパースして理解するASN.1
muno92
PRO
0
460
20260514 - build with ai 2026 - build LINE Bot with Gemini CLI
line_developers_tw
PRO
0
450
~ 秘伝のタレ化した『神スプシ』と戦う ~ 関数型パラダイムで壊れない仕組みへ
h0r15h0
1
110
Featured
See All Featured
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
300
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
It's Worth the Effort
3n
188
29k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
390
Visualization
eitanlees
151
17k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.1k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4k
New Earth Scene 8
popppiees
3
2.2k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
510
HDC tutorial
michielstock
2
670
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2k
Transcript
Game Widget Library using React @yosuke_furukawa
Twitter: @yosuke_furukawa Github: yosuke-furukawa
New Logo
New Node.js Logo is here
Recent works in my company • front-end / server-side engineer
• creating apps using Electron • creating widget library using React
Recent works in my company • front-end / server-side engineer
• creating apps using Electron • creating widget library using React
Demo note: please do not share in SNS….
Our stack • Babel • React • Facebook / flux
• css-modules (post-css) • webpack
Our stack • Babel • React • Facebook / flux
• css-modules (post-css) • webpack
tackling CSS in React
ͳΔ͘1ͭͷJSϑΝΠϧͰ ͔݁ͤͨͬͨ͞ɺJS, CSS͕ ෳʹ͔ΕΔΑ͏ͳঢ়گΛ ආ͚͔ͨͬͨɻ
ήʔϜͷதͰಡΈࠐ·ΕΔͷ Ͱɺcss ͷclassNameڝ߹Λ ͔͗ͨͬͨɻ
We try to choose • CSS in React (using style
attribute) • Radium • css-modules
We try to choose • CSS in React => media
query pseudo attribute ɺ͍͍ͨػೳ͕͑ͳ͔ͬͨɻ • Radium => media query ͳͲରԠ͍ͯ͠Δͷͷɺ Ұ෦ͷpseudo ଐੑͱ͔͕͑ͳ͍ɺยखམͪͩͬͨ • css-modules => CSSͷػೳ͕ී௨ʹ͑ͨɻclass໊ ͷڝ߹શʹ͛ͳ͍͕ɺ͋Δఔ͛Δɻ
css-modules :local(.localClass) { color: green; } :local(.subClass) { color: red;
} :global(.globalClass) { color: blue; } ._23_aKvs-b8bW2Vg3fwHozO { color: green; } ._13LGdX8RMStbBE9w-t0gZ1 { color: red; } .globalClass { color: blue; } http://morishitter.hatenablog.com/entry/2015/09/28/103334
ϑΝο࠷ߴΜ͚ɺ શ෦ΫϦΞͩʂʂ
ൃੜ…
widget library ඞͣήʔϜͷ ϖʔδΑΓઌʹग़ͯͳ͍ͱ͍͚ ͳ͍ͷͰɺ ϨϯμϦϯά্ඞਢͷϨΠΞτ ʹͳΔɻ
scriptΛಡΈࠐΉҐஔ͕ॏཁʹ ͳΔ <script src=“widget.js” /> ͜ΕΛͲ͜ͰಡΈࠐΉ͖͔ <html> <head> <!— ͜͜ͰಡΈࠐΉ?
—> <link rel=“stylesheet” href=“hoge.css”> <!— ͜͜ͰಡΈࠐΉ? —> </head> <body> <!— ͦΕͱɺ͜͜ͰಡΈࠐΉ? —> </body> </html>
ຊདྷ JS ϨΠΞτͱແ ؔͳ͜ͱ͕ଟ͍ͷͰ body ด͡λάͷ্Ͱఆٛ͢Δ͜ͱ ͕ଟ͍͕ɺ͜ͷ߹ css ͱ ಉ༷ͷҐஔʹඞཁʹͳΔ
ϥΠϒϥϦϨΠϠ͚ͩ͡Όղ ܾͰ͖ͳ͍ͷͰɺ͍ํͷυ Ωϡϝϯτʹ໌هɻɻɻ
ࠓେ͖ͳى͖ͯͳ͍ (∩´∀ʆ)∩ƂŖŘ
ͨͩ͠ • ͲΜͳΞϓϦέʔγϣϯ͜ͷΓํ͕ྑ͍ͱࢥΘͳ͍ɻ • JSͱCSSΛҰॹʹͨ͜͠ͱͰى͖Δଟ͍ɻ • cache ͕ޮ͔ͳ͍ͱ͔ • http2
࣌ʹͳͬͨΒͦͦฒྻͰऔͬͯ͜ΕΔͷʹͦͷྑ͞Λ ফͯ͠Δͱ͔ • ࠓճͷΑ͏ͳέʔεׂ͕ͱಛघͳͷͰͳ͍͔ɻ • ΈΜͳී௨ʹCSSΛॻ͖·͠ΐ͏ɻ
Our stack • Babel • React • Facebook / flux
• css-modules (post-css) • webpack
·͊ͬͺΓ ES2015 Θͳ ͍खͳ͍
2015ͳͷʹ·ͩ class Θ ͳ͍ͱ͔ɺtemplate string literals Θͳ͍ͱ͔ϓϥΠυ ͕ڐ͞ͳ͔ͬͨɻ
͋Μ·Γେͨ͠ى͖ͳ͔ͬ ͨ • Babel v6 Ͱੌ·͍͡σάϨ͕Ұճى͖ͯQA ͷਓୡશମͷख͕ࢭ·ͬͨɻɹ • ES2015 શવͷνʔϜʹਁಁͯ͠ͳ͍
͋Μ·Γେͨ͠ى͖ͳ͔ͬ ͨ • Babel v6 Ͱੌ·͍͡σάϨ͕Ұճى͖ͯQA ͷਓୡશମͷख͕ࢭ·ͬͨ(ͷͰɺv5ʹ͠ ͨɻ) • ES2015
શવͷνʔϜʹਁಁͯ͠ͳ͍
͜Ε·Ͱॻ͍ͯͨͷ͘͢͝ basic ͳ JavaScript prototype? ԿͦΕͳਓୡ
ٻΊΒΕΔڭҭ…
None
tower-of-babel νϡʔτϦΞϧΛ࡞ͬͯ ΈΜͳʹΒͤͨ
ͱΓ͋͑ͣॻ͚ΔΑ͏ʹ ͳͬͨ
ͨͩ͠ɻɻɻ
ES5 ͷڭҭ͕ͦͦ͞Εͯ ͳ͍ɻ
Array methodsΒͳ͗͢͞ Function.bindͱʁ
tower-of-es5 ͷػӡ…
ES2015 ͔࣌ͩΒͦ͜ɺ ES5ͪΌΜͱ֮͑ͯѹత
·ͱΊ
React / babel / post-css / flux Ͱ widget ϥΠϒϥϦΛ࡞ͬͯΈͨ
• ͍ΖΜͳήʔϜͰ༡Ϳ࣌ʹReact ͰϥΠϒϥϦ ͕ಈ͕࣌͘དྷΔ͔ • CSS in JS ࠓ css-modules͕ྑ͍ɺͨͩ͠༻ ๏༻ྔʹؾΛ͚ͭͯɻ • ES2015Λָ͠ΉͳΒɺES5͍ͭͰʹ͑Α͏
Thank you for listening