Replies: 2 comments 1 reply
-
I think stuff like this are good examples of external packages. Remix Utils is a prime example. A lot of ideas were implemented in this library. Some of them eventually made it into Remix core. So definitely create a package for this, and I'm sure others that have similar needs will check it out. Good luck! |
Beta Was this translation helpful? Give feedback.
1 reply
-
I started a little experiment: remix-tracks. What do you think about it? sergiodxa/remix-utils#88 / https://github.com/luispuig/remix-tracks |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I will try to explain it in a use case:
Let's assume we need the route to handle "many" CRUD operations. With only one CRUD it is pretty straightforward using the loader/useLoaderData and the action.
What are the challenges of having many CRUD operations on the same route?
Of course, I'd love to create some component that I call
Box
that handles the show-data/show-form behavior across the routes.How do you think it is a good Remix strategy to implement it?
Possible solution: The RemixComponent
One possible solution is the possibility of creating RemixComponent, no frontend, no backend, a frontend-backend component. It is not much different to a Route. The RemixComponent could have a loader, action, and then be rendered in a route.
In a very old framework I created for myself using Zend Framework, the box component way of use was like this:
Files with the HTML for the show-data/edit-data

Each box has associated a dedicated "controller" for the server-side.
Disclaimer
Of course, I am interested in my personal use case strategy, but my point is to use it for proposing the RemixComponent or discussing a good way to handle similar situations. I can think of many more use-cases kind of similar.
Extra
Will it allow the use of directly RemixComponets from an npm package with all the logic for the backend and the frontend? I guess they can be configured somehow.
Beta Was this translation helpful? Give feedback.
All reactions