Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
macieklad committed Feb 5, 2024
1 parent 2629870 commit 6154dc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ After installing package, extend your `tsconfig.json` compiler options:
As in `jsxFactory` and `jsxFragmentFactory`, `Html` class must be available in scope whenever you are using JSX. You can import it directly in your files when using JSX:

```tsx
import Html from 'adonisjsx'
import { Html } from 'adonisjsx'

router.get('/', async ({ view }) => {
return <div>Hello World</div>
Expand Down Expand Up @@ -119,7 +119,7 @@ But you may want to show most of your UI instantly, and then stream only the par
import { Suspense } from 'adonisjsx'

router.get('/', async ({ streamJsx }) => {
streamJsx(MyComponent)
streamJsx(MyComponent, { errorCallback: (error) => ([`Rendering failed: ${error.message}`, 500]) })
})

function MyComponent({ rid }) {
Expand Down

0 comments on commit 6154dc3

Please sign in to comment.