Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mx-space/nai-astro


https://github.com/mx-space/nai-astro

Last synced: 28 days ago
JSON representation

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`
}
```