-
Notifications
You must be signed in to change notification settings - Fork 651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify Fresh Server #1487
Comments
To expand on this more: File system routing would work the same way as today, just the implementation details change under the hood. This proposal also makes middlewares and handlers the same thing. Once we add layouts the distinction between middleware and handler becomes even less necessary. The one thing we haven't figured out is how to get islands to work with that model. Maybe there is a clever way to work with virtual entry points. |
I recently was wondering how it would be possible to register Islands outside the concept of the Islands folder. In our case, we have a shared Atomic library that implements both server and client components. Right now to get them working, we create simple passthrough wrappers in our islands folders (https://github.com/o-biotech/biotech-manager-web/blob/integration/islands/molecules/InteractiveResponsiveSet.tsx). it would be nice that if somewhere in our startup logic (main.ts?) we could register components from other frameworks as islands. It feels like where this is going could unlock that feature as well. |
Closing as this has been achieved as part of Fresh 2 |
Right now Fresh relies mostly on a specific folder structure to function. It uses these to resolve routes, find islands etc. The question that came up in a call with @lucacasonato a while back is: Is it necessary to tie it to the file system? What would it take to create a Fresh app in one single file? Benefit would be that you could instantiate a Fresh app in our playground which currently doesn't support multiple files.
After a bit of discussion we came up with this idea:
Naming of these functions or methods are still to be discussed, but in general I think the direction is sound. The file system logic we have now would use this internally.
The text was updated successfully, but these errors were encountered: