Slide 1

Slide 1 text

@8845musign React Numa CSS Architect

Slide 2

Slide 2 text

ෲےϩʔϥʔͷྗΛ৴͡Ζ @8845musign

Slide 3

Slide 3 text

Anova Frontend Engineer

Slide 4

Slide 4 text

Anova Frontend Engineer ϩʔετϏʔϑΛ࡞͖ͬͯ·ͨ͠ʂʂʂ

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

σϞϯετϨʔγϣϯ޲͚6* ࢼ༻ظؒʹ͖߱ͬͯͨ

Slide 7

Slide 7 text

6*ϚʔΫΞοϓ͸ಘҙ෼໺ʂ Ϙλϯ ϓϧμ΢ϯ

Slide 8

Slide 8 text

6*ͳΒ͓ͯͷ΋ͷ Ϙλϯ ϓϧμ΢ϯ śŘʙŕţʙʂʂʂ ͔͠͠ɺ͍ͭ͜Β͕͍ͨ śŨŜƀŕţʙʂ

Slide 9

Slide 9 text

ࢥͬͨҎ্ʹεϐʔυͰͳ͍ʜ

Slide 10

Slide 10 text

পʹ͸·ͬͨɺͨͬͨ̐ͭͷεςοϓ

Slide 11

Slide 11 text

ऴɹΘɹͬɹͨɹʁ ⾫ґཔओ

Slide 12

Slide 12 text

ґཔओ͕͜Ε͔͠ݴΘͳ͘ͳͬͨ ※൒෼͸ωλͰ͢

Slide 13

Slide 13 text

$44ͷίϯϙʔωϯτΛ੾Δલʹ ΅͘ͷΫϏ͕੾ΒΕͦ͏ ※͕͢͞ʹωλͰ͢

Slide 14

Slide 14 text

1 ͦ͜ʹ͸ن໿΋ͳ͍̍ຕͷ޿େͳ4BTT͕޿͕͍ͬͯͨɻপͩͬͨ ࠷ޙʹ$44+4ίϯϙʔωϯτཻ౓ͷপ͕଴͍ͬͯͨ ࣍ʹίϯύΠϧεϐʔυͷপʹ଍ΛऔΒΕͨ ϓϩδΣΫτʹ͸·ͣ3FBDU͕͋ͬͨɺ๻͸3FBDU্Ͱॻ͖ग़ͨ͠ 2 3 4

Slide 15

Slide 15 text

$44ͷίϯϙʔωϯτΛ੾Δલʹ ΅͘ͷΫϏ͕੾ΒΕͦ͏ ࢼ༻ظ͚ؒͩͳΜͱ͔৐Γ੾Εʂʂʂʂ ※ωλͰͬͯ͢ʂʂʂ

Slide 16

Slide 16 text

$44ઃܭ ίʔσΟϯά؀ڥ ̎ͭͷଆ໘͔ΒվળΛ͢Δ

Slide 17

Slide 17 text

$44ઃܭ

Slide 18

Slide 18 text

Ͳ͜ʹ࡞༻͢Δ͔Λ໌֬ʹ͍ͨ͠

Slide 19

Slide 19 text

ٕज़తʹ$44Λղܾ͢ΔΞϓϩʔν

Slide 20

Slide 20 text

طଘͷ4BTT͔ΒͷҠߦ͸ʁ ֶशίετ͕͔͔Γͦ͏ අ༻ରޮՌ͸ʁ νʔϜશһ͕͍ͭ࢖͑ΔΑ͏ʹͳΔʁ

Slide 21

Slide 21 text

ઃܭʹΑΔΞϓϩʔν https://en.bem.info/

Slide 22

Slide 22 text

1 ಛఆͷٕज़ʹϩοΫΠϯ͞Εͳ͍ ωετΛపఈతʹഉআ͢Δɺͱ͍͏ࢥ૝͸ૉ੖Β͍͠ Ϋϥε໊Λߟ͑Δ͜ͱ͕೉͍͠ 1 2 Good Bad

Slide 23

Slide 23 text

πʔϧ͸ઃܭΛղܾͯ͘͠Εͳ͍

Slide 24

Slide 24 text

୯७Ͱ୭Ͱ΋ཧղͰ͖Δઃܭ $44ʢ4BTTʣͱXFCQBDLͷMPBEFS͚ͩͰ

Slide 25

Slide 25 text

͖Ίͨ͜ͱ

Slide 26

Slide 26 text

%JSFDUPSZϕʔεͷΫϥε໋໊ SomeComponent !"" ChildA !"" ChildB #"" childB.scss #"" childB.js !"" list.scss .some-component-child-a-child-b-list

Slide 27

Slide 27 text

௕͍Ϋϥε໊ͷղܾ const CSS_ROOT = ‘some-component-child-a-child-b-list'; class List extends Component { render() { return
} }

Slide 28

Slide 28 text

௕͍Ϋϥε໊ͷղܾ .some-component-child-a-child-b-list { &__item { … } &__button { … } … } BlockΛলུ͢Δ ͨΊ͚ͩͷωετ

Slide 29

Slide 29 text

1 ίϯϑϦΫτ͸΄΅ͳ͍ Ϋϥε໊͔ΒσΟϨΫτϦΛ௥͏ͷ͕༰қ ͍ͩ͞ʜ 1 2 Good Bad

Slide 30

Slide 30 text

ίϯϙʔωϯτͷཻ౓ +4ͱ$44Ͱ͕جຊʢྫ֎͸͋Δʣ

Slide 31

Slide 31 text

ίϯϙʔωϯτͷཻ౓ +4ͷ౎߹ʹ߹ΘͤͯίϯϙʔωϯτΛ෼ׂ

Slide 32

Slide 32 text

ྫ͑͹5BCMF head head head head body body body body body body body body body body body body body body body body body body body body body body body body

Slide 33

Slide 33 text

ྫ͑͹5BCMF head head head head body body body body body body body body body body body body body body body body body body body body body body body body

Slide 34

Slide 34 text

+4ʹ΍ΜΘΓͻΕ෬͢ MPPQͯ͠SFOEFS͢ΔUSͰίϯϙʔωϯτΛ੾Δ QSPQTόέπϦϨʔͷ੾Ε໨Λҙࣝ͢Δ͜ͱͰ ύϑΥʔϚϯενϡʔχϯά͕͠΍͘͢ͳΔར఺΋ )5.-$44ͷ౎߹Ͱ͚ͩͰίϯϙʔωϯτ੾ͬͯɺ͏͔ͬΓ +4࣮૷࣌ʹελΠϧ͕+4ίϯϙʔωϯτʹΑͬͯ෼அ͞ΕΔͱਏ͍

Slide 35

Slide 35 text

)5.-ϚʔΫΞοϓͱ+4ίʔσΟϯά Ͱࣄલ͢Γ߹ΘͤΛ͠ͱ͘ͱ޾ͤ

Slide 36

Slide 36 text

JNQPSUϧʔϧ $PNQPOFOU಺Ͱ҉໧తʹJNQPSU͞Εͨ$44ͷదԠΛېࢭ͢Δ ໌ࣔతʹJNQPSUͨ͠$44ͷΈదԠՄೳͱ͢Δ +4ͱ$44ͷͰରԠ͢Δ$44Ҏ֎͸ɺϞδϡʔϧ΋͘͠͸ γεςϜڞ௨$44ͷΈಡΈࠐΜͰྑ͍ 1 2

Slide 37

Slide 37 text

҉໧తͳJNQPSUͷېࢭ Component #"" ChildComponent $ #"" child.scss $ !"" child.js #"" index.scss !"" index.js

Slide 38

Slide 38 text

҉໧తͳJNQPSUͷېࢭ Component #"" ChildComponent $ #"" child.scss $ !"" child.js #"" sharedComponent.scss #"" index.scss !"" index.js ڞ௨ελΠϧͷநग़

Slide 39

Slide 39 text

JNQPSUՄೳൣғ Component #"" ChildComponentA $ #"" childA.scss $ !"" childA.js #"" ChildComponentB $ #"" childB.scss $ !"" childB.scss #"" index.scss !"" index.js ໌ࣔతͰ΋ېࢭ

Slide 40

Slide 40 text

JNQPSU͔ΒదԠελΠϧ͕ Θ͔Δঢ়ଶΛݎक͢Δ

Slide 41

Slide 41 text

ωετېࢭ .some-class tr td {} .some-class__list__btn {} ཁૉ΋͘͠͸ΫϥεʹΑΔωετ #&.ͰͷΤϨϝϯτಉ࢜ͷωετ ωετͷൃੜ͸ίϯϙʔωϯτ෼ׂͷαΠϯ

Slide 42

Slide 42 text

ωετېࢭ .some-class tr td {} .some-class__list__btn {} ཁૉ΋͘͠͸ΫϥεʹΑΔωετ #&.ͰͷΤϨϝϯτಉ࢜ͷωετ ωετͷൃੜ͸ίϯϙʔωϯτ෼ׂͷαΠϯ .some-class__list-btn͸ΞϦ

Slide 43

Slide 43 text

୭Ͱ΋Θ͔Δϧʔϧ͸ਁಁ͠΍͍͢

Slide 44

Slide 44 text

ίʔσΟϯά؀ڥ

Slide 45

Slide 45 text

#SPXTFS4ZOD࣌୅ͷ ɹര଎NTͦͦ͜͜ͷMJWFSFMPBEͱൺ΂

Slide 46

Slide 46 text

XXXXXXFCQBDLʜ

Slide 47

Slide 47 text

஗͍ XFCQBDL ஗͍

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

IUUQTHJUIVCDPNTUPSZCPPLTTUPSZCPPL

Slide 50

Slide 50 text

ίϯϙʔωϯτ୯ҐͰ۠੾ΒΕͨ αϯυϘοΫε։ൃ؀ڥ

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

γϯϓϧͳϏϧυઃఆ͕దԠ͞ΕΔɺ͸΍͍ ࣗવͱίϯϙʔωϯτ୯ҐͰͷίʔσΟϯά͕ཁٻ͞ΕΔ ίϯϙʔωϯτཆ੒Ϊϓε ผ్ɺઐ༻4UPSZΛهड़ͨ͠+4ϑΝΠϧΛ༻ҙඞཁ͕͋Δ 1 Good Bad υΩϡϝϯςʔγϣϯπʔϧͱͯ͠ΈΔͱඪ४ػೳ͸͔ͳΓශऑ ΠϕϯτͷൃՐ΋هड़Ͱ͖Δ 2 3 1 2

Slide 53

Slide 53 text

Ϗϧυ͕࣌ؒ ਺T͔ΒʙTఔ౓΁ͷվળ ˞ͦ΋ͦ΋ͷݩͷXFCQBDLઃఆʹվળͷ༨஍͕͋Δ͔΋͠Εͳ͍͕

Slide 54

Slide 54 text

4UPSZͷهड़ import React from ‘react'; import { storiesOf, action } from '@kadira/storybook'; import Button from ‘../components/Button'; storiesOf('Button', module) .add('with text', () => ( Hello Button ));

Slide 55

Slide 55 text

TTTTTTTTTTTTTTTTUPSZʜ

Slide 56

Slide 56 text

໘౗ ໘౗ TUPSZ

Slide 57

Slide 57 text

> yo project:story śŕţ

Slide 58

Slide 58 text

௥ՃBEEPO TUPSZCPPLTSFBDUTUPSZCPPLBEEPOJOGP આ໌จͷϖʔδ಺΁ͷهड़ɺαϯϓϧίʔυ΍ QSPQTҰཡΛࣗಈੜ੒͕Մೳ UVDILTUPSZCPPLSFBENF NBSLEPXOܗࣜͷ3&"%.&ϑΝΠϧΛදࣔ 1 2

Slide 59

Slide 59 text

ࠔΓࣄ ϝχϡʔͷ֊૚Խ͕Ͱ͖ͣɺ໊લͷ෇͚ํ΍ ̍ϖʔδʹෳ਺4UPSZΛهड़͢ΔͳͲͰରԠʜ

Slide 60

Slide 60 text

ࠔΓࣄ ϝχϡʔͷ֊૚Խ͕Ͱ͖ͣɺ໊લͷ෇͚ํ΍ ̍ϖʔδʹෳ਺4UPSZΛهड़͢ΔͳͲͰରԠʜ ୭͔ڭ͍͑ͯͩ͘͞ʂ

Slide 61

Slide 61 text

$44ઃܭ ίʔσΟϯά؀ڥ ໎Θͳ͍ ໌֬ͳϧʔϧઃఆ ࣮૷εϐʔυΛམͱ͞ͳ͍ շదͳ؀ڥͷ௥ٻ

Slide 62

Slide 62 text

⾫ґཔओ

Slide 63

Slide 63 text

͋Μ͠Μ

Slide 64

Slide 64 text

ࠓޙͷ53:

Slide 65

Slide 65 text

4UZMF(VJEFӡ༻ϑϩʔͷཱ֬

Slide 66

Slide 66 text

4UZMF(VJEF 4UPSZCPPLΛ࢖͏ 3FBDUίϯϙʔωϯτΧλϩάͱσβΠϯΨΠυϥΠϯΛ౷߹ ΤϯδχΞ͔ΒσβΠφʔɺϓϩδΣΫτʹؔΘΔਓ͢΂ͯʹ ͱͬͯՁ஋ͷ͋Δ΋ͷͱ͢Δ

Slide 67

Slide 67 text

Build Design ΤϯδχΞ σβΠφʔ

Slide 68

Slide 68 text

Build Design ΤϯδχΞ σβΠφʔ HJUQVTI

Slide 69

Slide 69 text

Build Design ΤϯδχΞ σβΠφʔ HJUQVTI +FOLJOTͰ੩తϏϧυ

Slide 70

Slide 70 text

Build Design ΤϯδχΞ σβΠφʔ HJUQVTI +FOLJOTͰ੩తϏϧυ #PPLΛνΣοΫͭͭ͠ σβΠϯ

Slide 71

Slide 71 text

Build Design ΤϯδχΞ σβΠφʔ HJUQVTI +FOLJOTͰ੩తϏϧυ #PPLΛνΣοΫͭͭ͠ σβΠϯ σβΠϯΛίʔσΟϯά ͭͭ͠ΨΠυԽ

Slide 72

Slide 72 text

Build Design ΤϯδχΞ σβΠφʔ HJUQVTI +FOLJOTͰ੩తϏϧυ #PPLΛνΣοΫͭͭ͠ σβΠϯ σβΠϯΛίʔσΟϯά ͭͭ͠ΨΠυԽ ҰఆظؒͷΠςϨʔγϣϯͰ܁Γฦ͢

Slide 73

Slide 73 text

Build Design ΤϯδχΞ σβΠφʔ ٕज़తͳো֐΍Ͱ͖Δ͜ͱ Λ఻͍͑ͯ͘ σβΠϯͷ๏ଇੑ΍ ίϯϙʔωϯτΛൃݟ ྫ͑͹Ϛʔδϯ୯Ґ΍Α͘࢖ΘΕΔ৭ͳͲ

Slide 74

Slide 74 text

Build Design ΤϯδχΞ σβΠφʔ ϒϥϯσΟϯάؚΊΑΓ େ͖ͳࢹ఺͔ΒͷνΣοΫ

Slide 75

Slide 75 text

Build Design ΤϯδχΞ σβΠφʔ ϒϥϯσΟϯάؚΊΑΓ େ͖ͳࢹ఺͔ΒͷνΣοΫ ίϛϡχέʔγϣϯϋϒ

Slide 76

Slide 76 text

4UZMF(VJEFΛ࢖ͬͯ౸ୡ͍ͨ͠Ϩϕϧ

Slide 77

Slide 77 text

σβΠφʔͷηϯεΛ໌Β͔ʹͯ͠ ϊϯσβΠφʔ΋σβΠϯʹࢀՃͰ͖Δ

Slide 78

Slide 78 text

σβΠϯΛεΩϧͱͯ͠ଊ͑Δ

Slide 79

Slide 79 text

ͨ·ʹ͸ ΤϯδχΞ΋σβΠϯͯ͠ΈΔτΧ

Slide 80

Slide 80 text

Atomic Design Ebook Ϟδϡʔϧࢦ޲ͷσβΠϯ ΫϥΠΞϯτɾ૊৫ͷઆಘ ӡ༻ϑϩʔͷߏங σβΠϯγεςϜͷ༗ޮੑ

Slide 81

Slide 81 text

Atomic Design Ebook Ϟδϡʔϧࢦ޲ͷσβΠϯ ΫϥΠΞϯτɾ૊৫ͷઆಘ ӡ༻ϑϩʔͷߏங σβΠϯγεςϜͷ༗ޮੑ

Slide 82

Slide 82 text

Atomic Design Ebook Ϟδϡʔϧࢦ޲ͷσβΠϯ ΫϥΠΞϯτɾ૊৫ͷઆಘ ӡ༻ϑϩʔͷߏங σβΠϯγεςϜͷ༗ޮੑ Ϟδϡʔϧ͝ͱʹϑΥʔΧεͯ͠ධՁ͢Δ ·ͣ͸Կ͕ඒ͍͠ͷ͔ʁΛΫϥΠΞϯτͱͭΊΔ

Slide 83

Slide 83 text

http://atomicdesign.bradfrost.com/chapter-2/

Slide 84

Slide 84 text

http://atomicdesign.bradfrost.com/chapter-2/ ཻ౓ͷ࿩͸͋Μ·͠ࡌͬͯͳ͍

Slide 85

Slide 85 text

http://atomicdesign.bradfrost.com/chapter-2/ atomic design is not rigid dogma - Brad Forst

Slide 86

Slide 86 text

͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠