Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mx-space/nai-astro
https://github.com/mx-space/nai-astro
Last synced: 28 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mx-space/nai-astro
- Owner: mx-space
- Created: 2023-01-24T15:12:58.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T17:53:17.000Z (about 1 year ago)
- Last Synced: 2024-04-18T17:22:55.273Z (8 months ago)
- Language: TypeScript
- Size: 81.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nai-astro-solidjs
## Notes For me
- In Solid, props can't destruct before return render element, if that will lost props reactive. E.g.
```tsx
const FC = (props) => {
const { someProps } = props // will lost props reactive
return null
}
```- Seem to Astro only a buildkit framework, only render DOM structure in server-side or SSG (in build period). So it hadn't any state-management and global layout or router system, even root context injection. We can't pass `` (e.g. React, Solid or other) in `.astro` page layout, or do this it will not working.
```tsx
// pages/index.astro
// context/index.tsx
const ReactContext = React.createContext()// components/home.tsx
const Home = () => {
const context = useContext(ReactContext) // can't access context which passing in the `index.astro`
}
```