Coder Social home page Coder Social logo

Comments (2)

machour avatar machour commented on September 27, 2024

Hey @NicolasCharpentier

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.

machour avatar machour commented on September 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.