with Tooltip
with Dot
withTooltip
withDot
@gurlcode
Slide 9
Slide 9 text
with Tooltip
with Dot
with Modal
withDot
withModal
withTooltip
@gurlcode
Slide 10
Slide 10 text
{}}
hasRoundedCorners
withAnalytics analyticsProps={analyticsProps}
/>
BEWARE THE
APROPSCALYPSE
@gurlcode
Slide 11
Slide 11 text
@gurlcode
Slide 12
Slide 12 text
@gurlcode
Slide 13
Slide 13 text
You have another
reservation at this time.
@gurlcode
Slide 14
Slide 14 text
Is the user logged in?
State of subscription? Join
State of class?
Reactivate
Reserve Cancel
Disabled
Join
yes no
cancelled subscribed
unsubscribed
available unavailable reserved
@gurlcode
Slide 15
Slide 15 text
No content
Slide 16
Slide 16 text
@gurlcode
Slide 17
Slide 17 text
reusable !== flexible
@gurlcode
Slide 18
Slide 18 text
Flexibility is about more than reusability.
It’s about the ability understand and augment.
@gurlcode
Slide 19
Slide 19 text
@gurlcode
Slide 20
Slide 20 text
@gurlcode
Slide 21
Slide 21 text
@gurlcode
Slide 22
Slide 22 text
@gurlcode
Slide 23
Slide 23 text
@gurlcode
Slide 24
Slide 24 text
@gurlcode
Slide 25
Slide 25 text
@gurlcode
Slide 26
Slide 26 text
Keep business logic out of your components.
@gurlcode
Slide 27
Slide 27 text
@gurlcode
Slide 28
Slide 28 text
Centralized logic is easier to reason about
@gurlcode
Slide 29
Slide 29 text
Test the component separate from the logic
@gurlcode
Decreased prop complexity
Use whatever logic we want
Use individual CTAs alone
Add & remove CTAs with ease
Use whatever logic we want
Use individual CTAs alone
Add & remove CTAs with ease
@gurlcode
Slide 60
Slide 60 text
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
Slide 80 text
Thank you!
Content by Jenn Creighton
Illustrations by Janny Ji (jannyji.com)
@gurlcode