Replies: 2 comments 2 replies
-
|
Funnily, this is a duplicate of...another discussion from you 😆 #750 |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
Do you have some examples of use cases? Currently the proposal gives the stylistic motivation of using the same component format for page and components, but I’m curious about what users could do with this that they can’t currently. |
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.
-
Body
Summary
Allow framework components to be pages, instead of using Astro modules, for example
src/pages/index.tsxbeing a React component.Additionally allow framework components to contain islands. Any component in
src/islands/can be used as an island in the framework component pages.Background & Motivation
The primary reason for creating the
.astroformat was to facilitate the island architecture. By having our own templating forward we could enforce rules like the use of theclient:directives to have a special meaning in compilation.This RFC seeks to allow framework components to act as pages, allowing users to use the same component model for both their backend and frontend.
Goals
src/pages/directory, and therefore to act as pages.Example
src/islands/counter.tsx
src/pages/index.tsx
Beta Was this translation helpful? Give feedback.
All reactions