Slide 1

Slide 1 text

INTRO TO REMIX Get in fashion by going old school

Slide 2

Slide 2 text

Who is this guy? Stratos Pavlakis Head of engineering @Blueground https:/ /github.com/th3hunt https:/ /twitter.com/th3hunt

Slide 3

Slide 3 text

Agenda • 👋 Remix • 🧠 Remix philosophy • 🏭 Create a Remix project • Kick-ass features • Fast builds • Nested routes • Data loading via loaders • Data writing via actions • Styling • Error handling • Made easy with Remix • SEO • Accessibility • Pending UI • Optimistic UI • Prefetching • Answers to obvious questions • Why use Remix • When to use Remix • How to learn Remix

Slide 4

Slide 4 text

👋 Remix

Slide 5

Slide 5 text

Is a full stack web framework 👋 Remix Remix is the View and the Controller but it leaves the Model up to us

Slide 6

Slide 6 text

Remix stands About here

Slide 7

Slide 7 text

Brought to you by… + Michael Jackson Ryan Florence Kent C. Dodds

Slide 8

Slide 8 text

Back in Apr 2021… it came with a… subscription model

Slide 9

Slide 9 text

Nov 2021 - v1.0 became OSS & slick 😍

Slide 10

Slide 10 text

🧠 Remix philosophy

Slide 11

Slide 11 text

🧠 Remix philosophy • Work with web fundamentals - not around them • Less Javascript == faster web • Progressive enhancement == great UX • Convention over con fi guration improves developer experience and productivity • Code colocation for more maintainable codebases Old Skool

Slide 12

Slide 12 text

Create a Remix project

Slide 13

Slide 13 text

Create a Remix project

Slide 14

Slide 14 text

Create a Remix project

Slide 15

Slide 15 text

Create a Remix project

Slide 16

Slide 16 text

https:/ /www.imdb.com/title/tt0096256/

Slide 17

Slide 17 text

Kick-ass features

Slide 18

Slide 18 text

Kick-ass features https:/ /remix.run/docs/en/v1/tutorials/jokes

Slide 19

Slide 19 text

Kick-ass features: Fast builds!

Slide 20

Slide 20 text

Kick-ass features: Nested routes • Powered by React Router v6 • Component tree is known at request time enabling tons of optimizations • A single URL matches multiple nested routes == all components along the tree path

Slide 21

Slide 21 text

Kick-ass features: Load data with Loaders In CSR, this becomes a remote fetch() call

Slide 22

Slide 22 text

Kick-ass features: Write data with Actions • Progressive enhancement: Use instead of to emulate browser behavior with fetch • useActionData() typically used for validation • useSubmit() to submit programmatically • useFetcher() to call a loader/ action outside of navigation

Slide 23

Slide 23 text

Kick-ass features: Styling root.tsx /routes/jokes.tsx routes/jokes/new.tsx

Slide 24

Slide 24 text

Kick-ass features: Styling ✅ CSS with scoping built-in ✅ PostCSS ✅ Tailwind CSS 🟡 CSS in JS 🔴 CSS modules

Slide 25

Slide 25 text

Kick-ass features: Error handling root.tsx /routes/jokes.tsx routes/jokes/new.tsx

Slide 26

Slide 26 text

Made easy with Remix

Slide 27

Slide 27 text

Made easy with Remix • Progressive enhancement • Excellent performance baseline • SEO • Accessibility • Pending UI • Optimistic UI • Prefetching

Slide 28

Slide 28 text

Answers to obvious questions :)

Slide 29

Slide 29 text

Why use Remix? • Super fast builds • Normalised platforms • Simple and minimal API • Better SEO out of the box • Better accessibility baseline • Shorter TTI • Fewer, better tests • Coming soon: ServiceWorker support • HTTP streaming support very possible • URL fi rst approach • Work with, not against the web fundamentals • Convention over con fi guration • One recommended way to do things ⚙ Technical reasons 🧐 Viewpoint reasons

Slide 30

Slide 30 text

Why use Remix? • URL fi rst approach • Work with, not against the web fundamentals • Convention over con fi guration • One recommended way to do things 🧐 Viewpoint reasons

Slide 31

Slide 31 text

When to use Remix? • Websites (marketing, blogs, e- shops) • Where SEO is critical • Small to medium web apps - consisting of linear business fl ows • Where progressive enhancement is very important (e.g. EdTech) • Larger web apps • Non linear / mixed component hierarchies • Non UI oriented services (e.g. a micro-service that happens to also have a thin UI) • If you can get away with SSG ✅ Adopt 🧐 Trial/Assess

Slide 32

Slide 32 text

How to learn Remix? • Remix Docs • Tutorial: Dev Blog • Tutorial: Jokes app • Remix singles • Remix tutorial with Kent • Remix examples 👈

Slide 33

Slide 33 text

Thank you! Any questions about ?