Git Product home page Git Product logo

Comments (7)

retry19 avatar retry19 commented on July 20, 2024 1

No, please don't move the whole dashboard.tsx into dashboard/index.tsx file. I've made that mistake before and it caused this error: remix-run/remix#698 (comment). Please refer to my commit 11cec7f for more context.

We need both dashboard.tsx and dashboard/index.tsx at the same time for these needs:

  • The dashboard.tsx file is for the application shell (dashboard layout), rendering the <Outlet /> component.
  • The index.tsx file is for your CTA content only, in which Remix will render it inside the <Outlet /> component.

Ok, I got it 😄

from kelas.rumahberbagi.com.

zainfathoni avatar zainfathoni commented on July 20, 2024 1

mas @zainfathoni for now dashboard.tsx contain setting component, should I remove it? because if I remove it, I must change e2e for dashboard too. I want to make sure first.

You can move it out of the /dashboard/index.tsx page and put it in the /dashboard/settings.tsx route instead.

Please also update the e2e tests accordingly while preserving the edit profile scenarios and functionality. Thanks! 🙏

from kelas.rumahberbagi.com.

retry19 avatar retry19 commented on July 20, 2024

Hi mas @zainfathoni, I want to contribute on this issue, but I little bit confuse regarding file structure on routes. For an empty purchase page, should I create app/routes/dashboard/purchase.tsx or app/routes/dashboard.purchase.tsx?

from kelas.rumahberbagi.com.

zainfathoni avatar zainfathoni commented on July 20, 2024

Hi mas @zainfathoni, I want to contribute to this issue, but I little bit confused regarding file structure on routes. For an empty purchase page, should I create app/routes/dashboard/purchase.tsx or app/routes/dashboard.purchase.tsx?

Please create the app/routes/dashboard/purchase.tsx file instead because we want to maintain multiple routes nested under the /dashboard route.

I think you might also need to implement app/routes/dashboard/index.tsx for the dashboard's index route to show this CTA component.

from kelas.rumahberbagi.com.

retry19 avatar retry19 commented on July 20, 2024

Hi mas @zainfathoni, I want to contribute to this issue, but I little bit confused regarding file structure on routes. For an empty purchase page, should I create app/routes/dashboard/purchase.tsx or app/routes/dashboard.purchase.tsx?

Please create the app/routes/dashboard/purchase.tsx file instead because we want to maintain multiple routes nested under the /dashboard route.

I think you might also need to implement app/routes/dashboard/index.tsx for the dashboard's index route to show this CTA component.

Ok, I'll move dashboard.tsx to dashboard/index.tsx and also create component for CTA

from kelas.rumahberbagi.com.

zainfathoni avatar zainfathoni commented on July 20, 2024

Ok, I'll move dashboard.tsx to dashboard/index.tsx and also create component for CTA

No, please don't move the whole dashboard.tsx into dashboard/index.tsx file. I've made that mistake before and it caused this error: remix-run/remix#698 (comment). Please refer to my commit 11cec7f for more context.

We need both dashboard.tsx and dashboard/index.tsx at the same time for these needs:

  • The dashboard.tsx file is for the application shell (dashboard layout), rendering the <Outlet /> component.
  • The index.tsx file is for your CTA content only, in which Remix will render it inside the <Outlet /> component.

from kelas.rumahberbagi.com.

retry19 avatar retry19 commented on July 20, 2024

mas @zainfathoni for now dashboard.tsx contain setting component, should I remove it? because if I remove it, I must change e2e for dashboard too. I want to make sure first.

from kelas.rumahberbagi.com.

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.