Comments (2)
Where I would have redirected in the component (client-side) if parent segment does not have the workshop.
In your case, /workshops/nimportequoi would still reply with a 200, and then would redirect client side. This looks really bad for seo, and I could reference a bunch of links with horrid stuff on the url, and they would get indexed by search engines, harming your website reputation 😄
In that regards, it makes sense to always have a test in the $workshopId.tsx
route.
Plus, the fact that you send an empty object in the loader looks pointless to me, I believe in many app a single resource won't be that big, so it's OK adding it in a response we already have to send.
Yep, in a real-world app, you wouldn't probably have the parent route load all entities, and the child routes read from that. Every child route would load its own entity in its loader and deal with it's own data. The purpose of the example is to show how to retrieve a parent route data at the component level, so it makes sense to have it that way.
The example is outdated, as we know have useRouteLoaderData
which is way more powerful in this particular case. I'm in the process of updating all examples.
Did you give Remix a go?
from examples.
Btw, closing this to tidy up the issue tracker, feel free to hop on our discord server to continue the conversation: https://rmx.as/discord
from examples.
Related Issues (20)
- [Feature Request] Framework user wants to have an example integration with Cloudscape Design System HOT 1
- _official-realtime-app Concurrent connections HOT 1
- tailwind styles are not processed in v1.19.2 but are in v1.19.1 HOT 1
- chakra-ui example has hydration issues HOT 2
- Stitches example: Greedy regexp pattern potentially breaks markup HOT 1
- MSW example not working HOT 2
- mdx-bundler example
- Example for Vite + Styled Components?? HOT 1
- Vite + Styled Components Example HOT 7
- Create an example of an app with nested routes HOT 1
- nprogress uses useTransition, should it use useNavigation instead? HOT 2
- Feature: Pocketbase Auth Example with Realtime Data
- Stripe HOT 1
- Transforming the `socket` example using `vite` HOT 1
- [framer-route-animation] window should not scroll to top immediately
- useLoaderData typing not working in contacts tutorial HOT 1
- [bug] multiple-forms example: missing import
- Styled Components + Remix SPA Mode + Vite
- Migrate examples to latest remix v2 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from examples.