Bladeren bron

Modify readme

Add clarification.
master
TheoryOfNekomata 1 jaar geleden
bovenliggende
commit
a9caf5ffd1
2 gewijzigde bestanden met toevoegingen van 3 en 1 verwijderingen
  1. +2
    -1
      README.md
  2. +1
    -0
      packages/iceform-next-sandbox/src/pages/greet.tsx

+ 2
- 1
README.md Bestand weergeven

@@ -70,7 +70,7 @@ export const getServerSideProps = Iceform.action.getServerSideProps(greet);
```

Lastly, define the form page:
```tsx
```ts
// [src/]pages/form.tsx

import * as React from 'react';
@@ -85,6 +85,7 @@ const FormPage: Iceform.NextPage = ({

const [responseData, setResponseData] = React.useState<unknown>();
React.useEffect(() => {
// response.bodyUsed might be undefined, so we use a strict comparison
if (response?.bodyUsed === false) {
response?.json().then((responseData) => {
setResponseData(responseData);


+ 1
- 0
packages/iceform-next-sandbox/src/pages/greet.tsx Bestand weergeven

@@ -9,6 +9,7 @@ const GreetPage: Iceform.NextPage = ({

const [responseData, setResponseData] = React.useState<unknown>();
React.useEffect(() => {
// response.bodyUsed might be undefined, so we use a strict comparison
if (response?.bodyUsed === false) {
response?.json().then((responseData) => {
setResponseData(responseData);


Laden…
Annuleren
Opslaan