Would it make sense to use Remix to render a headless CMS? #953
-
From what I can tell Remix relies heavily on knowing what routes exist so it can optimise what is loading. However, for a headless CMS you would not necessarily know said routes up front as they are stored behind an API call. In Express for example this would likely be implemented as a catch-all route at the end of the named ones ( So I guess the question is: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Wouldn't you just use a splat route and then in the |
Beta Was this translation helpful? Give feedback.
-
Is the structure of the pages arbitrary? Assuming it is then using remix, you still get Rendering and preloading Links. I would say it still makes sense. |
Beta Was this translation helpful? Give feedback.
Wouldn't you just use a splat route and then in the
loader
work out if that is a valid URL or not? If it is you'd get the data and return it and then the React component works out what to render from it. If it's not a valid route then return a 404.