@cironunesdev
CONFIDENCE
Add, change and delete CSS without any
unexpected consequences
Slide 11
Slide 11 text
@cironunesdev
CONFIDENCE
Add, change and delete CSS without any
unexpected consequences
DYNAMIC STYLES
Style your components with a global
theme or based on different states
Slide 12
Slide 12 text
@cironunesdev
CONFIDENCE
Add, change and delete CSS without any
unexpected consequences
DYNAMIC STYLES
Style your components with a global
theme or based on different states
MAINTAINIBILITY
Never go on a hunt for CSS affecting your
components ever again
Slide 13
Slide 13 text
@cironunesdev
CONFIDENCE
Add, change and delete CSS without any
unexpected consequences
DYNAMIC STYLES
Style your components with a global
theme or based on different states
MAINTAINIBILITY
Never go on a hunt for CSS affecting your
components ever again
PERFORMANCE
Send only the critical CSS to the user for a
rapid first paint
Slide 14
Slide 14 text
You know what’s better
than CSS-in-JS?
@cironunesdev
@cironunesdev
Type safety ✅ ✅ ✅
Safety level Shallow Deep 100%
Slide 22
Slide 22 text
@cironunesdev
Slide 23
Slide 23 text
let title = style([
boxSizing(`borderBox),
width(px(300)),
height(px(300)),
]);
@cironunesdev
Slide 24
Slide 24 text
let title = style([
boxSizing(`bordreBox),
width(px(300)),
height(px(300)),
]);
@cironunesdev
Slide 25
Slide 25 text
let title = style([
boxSizing(`bordreBox),
width(px(300)),
height(px(300)),
]);
@cironunesdev
Slide 26
Slide 26 text
@cironunesdev
let title =
style([
border(px(1), red, red),
boxSizing(`borderBox),
width(px(300)),
height(px(300)),
]);
Slide 27
Slide 27 text
@cironunesdev
let title =
style([
border(px(1), red, red),
boxSizing(`borderBox),
width(px(300)),
height(px(300)),
]);
Slide 28
Slide 28 text
@cironunesdev
Slide 29
Slide 29 text
@cironunesdev
100% SAFETY
The compiler finds errors reliably so you
don’t have to
Slide 30
Slide 30 text
@cironunesdev
100% SAFETY
The compiler finds errors reliably so you
don’t have to
CLARITY
There is far less ambiguity.
e.g.: “1” == 1 && 1.0 == 1
Slide 31
Slide 31 text
@cironunesdev
100% SAFETY
The compiler finds errors reliably so you
don’t have to
CLARITY
There is far less ambiguity.
e.g.: “1” == 1 && 1.0 == 1
LESS ERRORS
Type problems are a whole class of errors
you just don’t have to deal with
Slide 32
Slide 32 text
@cironunesdev
100% SAFETY
The compiler finds errors reliably so you
don’t have to
CLARITY
There is far less ambiguity.
e.g.: “1” == 1 && 1.0 == 1
LESS ERRORS
Type problems are a whole class of errors
you just don’t have to deal with
PERFORMANCE
The more information the compiler has,
the more it can optimise
Slide 33
Slide 33 text
How can I use it?
@cironunesdev
Slide 34
Slide 34 text
@cironunesdev
IT’S
SHOWTIME
FOLKS!
Slide 35
Slide 35 text
@cironunesdev
IT’S
SHOWTIME
FOLKS!
Slide 36
Slide 36 text
@cironunesdev
You may fall in love with Reason "
WARNING!
Slide 37
Slide 37 text
@cironunesdev
OBJECTIVES
Slide 38
Slide 38 text
@cironunesdev
OBJECTIVES
☐ Create a Todo app using ReasonReact
Slide 39
Slide 39 text
@cironunesdev
OBJECTIVES
☐ Create a Todo app using ReasonReact
☐ Style it using bs-css
Slide 40
Slide 40 text
@cironunesdev
OBJECTIVES
☐ Create a Todo app using ReasonReact
☐ Style it using bs-css
☐ Animate the items being added/removed
Slide 41
Slide 41 text
https://reasonml.github.io/
Slide 42
Slide 42 text
@cironunesdev
IN CASE YOU
HAVEN’T
NOTICED
Slide 43
Slide 43 text
@cironunesdev
⚡ speedy compilation time
IN CASE YOU
HAVEN’T
NOTICED
Slide 44
Slide 44 text
@cironunesdev
⚡ speedy compilation time
$ helpful error messages
IN CASE YOU
HAVEN’T
NOTICED
Slide 45
Slide 45 text
TAKEAWAYS
1 2 3
Slide 46
Slide 46 text
TAKEAWAYS
CSS-IN-JS
1 2 3
%
Slide 47
Slide 47 text
TAKEAWAYS
✓ Confidence: to add, change and
delete code
CSS-IN-JS
1 2 3
%
Slide 48
Slide 48 text
TAKEAWAYS
✓ Confidence: to add, change and
delete code
✓ Performance: improved by
delivering only the critical path CSS
CSS-IN-JS
1 2 3
%
Slide 49
Slide 49 text
TAKEAWAYS
✓ Confidence: to add, change and
delete code
✓ Performance: improved by
delivering only the critical path CSS
✓ Dynamic styles is a no brainer
CSS-IN-JS
1 2 3
%
Slide 50
Slide 50 text
TAKEAWAYS
✓ Confidence: to add, change and
delete code
✓ Performance: improved by
delivering only the critical path CSS
✓ Dynamic styles is a no brainer
CSS-IN-JS STATIC TYPING
1 2 3
%
Slide 51
Slide 51 text
TAKEAWAYS
✓ Confidence: to add, change and
delete code
✓ Performance: improved by
delivering only the critical path CSS
✓ Dynamic styles is a no brainer
CSS-IN-JS STATIC TYPING
✓ Confidence: that our code is correct
at compile-time
1 2 3
%
Slide 52
Slide 52 text
TAKEAWAYS
✓ Confidence: to add, change and
delete code
✓ Performance: improved by
delivering only the critical path CSS
✓ Dynamic styles is a no brainer
CSS-IN-JS STATIC TYPING
✓ Confidence: that our code is correct
at compile-time
✓ Performance: by giving the compiler
type information
1 2 3
%
Slide 53
Slide 53 text
TAKEAWAYS
✓ Confidence: to add, change and
delete code
✓ Performance: improved by
delivering only the critical path CSS
✓ Dynamic styles is a no brainer
CSS-IN-JS STATIC TYPING REASON
✓ Confidence: that our code is correct
at compile-time
✓ Performance: by giving the compiler
type information
1 2 3
%
Slide 54
Slide 54 text
TAKEAWAYS
✓ Confidence: to add, change and
delete code
✓ Performance: improved by
delivering only the critical path CSS
✓ Dynamic styles is a no brainer
CSS-IN-JS STATIC TYPING REASON
✓ Confidence: that our code is correct
at compile-time
✓ Performance: by giving the compiler
type information
✓ Confidence: that our code is
100% type safe and sound
1 2 3
%
Slide 55
Slide 55 text
TAKEAWAYS
✓ Confidence: to add, change and
delete code
✓ Performance: improved by
delivering only the critical path CSS
✓ Dynamic styles is a no brainer
CSS-IN-JS STATIC TYPING REASON
✓ Confidence: that our code is correct
at compile-time
✓ Performance: by giving the compiler
type information
✓ Confidence: that our code is
100% type safe and sound
✓ Familiar: Syntax & ecosystem
used by JS developers
1 2 3
%
Slide 56
Slide 56 text
Ciro Nunes
THANK YOU!
@cironunesdev
Slide 57
Slide 57 text
Ciro Nunes
THANK YOU!
Follow me on Twitter
@cironunesdev
Ask me anything!