You have another reservation at this time.
@gurlcode
Slide 14
Is the user logged in? yes
no
State of subscription?
unsubscribed
Join
cancelled
Reactivate
subscribed
Join State of class?
available
unavailable
reserved
Reserve
Disabled
Cancel
@gurlcode
Slide 15
Slide 16
@gurlcode
Slide 17
reusable !== flexible @gurlcode
Slide 18
Flexibility is about more than reusability. It’s about the ability understand and augment.
@gurlcode
Slide 19
@gurlcode
Slide 20
@gurlcode
Slide 21
<ScheduleCta type={?} />
@gurlcode
Slide 22
@gurlcode
Slide 23
@gurlcode
Slide 24
@gurlcode
Slide 25
@gurlcode
Slide 26
Keep business logic out of your components.
@gurlcode
Slide 27
@gurlcode
Slide 28
Centralized logic is easier to reason about
@gurlcode
Slide 29
Test the component separate from the logic
@gurlcode
Decreased prop complexity Use whatever logic we want Use whatever logic we want Use individual CTAs alone Use&individual CTAswith alone Add remove CTAs ease
Add & remove CTAs with ease @gurlcode
Slide 60
CTAs added and removed for A/B tests Removing Disable CTA on some pages Classnames changed Messaging changed for ReserveCta Ask for specific CTA on specific page @gurlcode
Start with the ideal API Let the API inform the component design Decide what level of magic you want Business logic does not belong in components Render Props is awesome (use it!) Be flexible as an engineer (know your traps, kill your darlings)
@gurlcode
Slide 80
Thank you! Content by Jenn Creighton Illustrations by Janny Ji (jannyji.com) @gurlcode