Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/framework/solid/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ SolidJS has been gaining popularity as a fast, reactive, and declarative library

```tsx
import { createResource, ErrorBoundary, Suspense } from 'solid-js'
import { render } from 'solid-js/web'

function App() {
const [repository] = createResource(async () => {
Expand All @@ -26,7 +27,7 @@ function App() {
<ErrorBoundary fallback={<div>Something went wrong!</div>}>
{/* Suspense will trigger a loading state while the data is being fetched */}
<Suspense fallback={<div>Loading...</div>}>
<div>{repository().updated_at}</div>
<div>{repository()?.updated_at}</div>
</Suspense>
</ErrorBoundary>
</div>
Expand Down Expand Up @@ -100,7 +101,7 @@ function App() {
The `data` property on a query is a SolidJS resource
so it will work with Suspense and transitions out of the box!
*/}
<div>{repositoryQuery.data.updated_at}</div>
<div>{repositoryQuery.data?.updated_at}</div>
</Suspense>
</ErrorBoundary>
</div>
Expand Down