3. Creating routes, and creating reusable components using fragments

preview_player
Показать описание
The third video in the "Building with RescriptRelay" series. In this video, we make the work we've done so far reusable via fragments, and use those fragment components to create a new route for the user profile. We create a small widget showing a few of the user's followers, and show how to link to the new user profile page, fully type safe using the RescriptRelayRouter.

We cover:
- Creating a new route, with codesplitting and data preloading
- Creating reusable and modularized components with their own data requirements using fragments
- Use our new reusable components to build up a new user profile view
- Working on a component used in multiple routes in isolation

- 1:15 Creating a new page with a new query
- 2:06 The Node interface and why I always use it to look up entities
- 3:15 Exhaustive pattern matching and why it's important
- 4:30 Creating a new route, with a path parameter
- 6:45 Codesplitting and preloading for the new route
- 9:13 Building a small widget showing user followers
- 11:50 Wiring up a custom scalar type
- 13:19 Type safe links
- 14:43 Controlling code and data preloading for links
- 17:40 Creating reusable components with fragments
- 28:27 Reusing our components to create the new user profile view
- 29:12 Building out a fragment component in isolation
- 32:10 Wrapping up
Рекомендации по теме