Explorar el Código

Modify readme

Add clarification.
master
TheoryOfNekomata hace 1 año
padre
commit
a9caf5ffd1
Se han modificado 2 ficheros con 3 adiciones y 1 borrados
  1. +2
    -1
      README.md
  2. +1
    -0
      packages/iceform-next-sandbox/src/pages/greet.tsx

+ 2
- 1
README.md Ver fichero

@@ -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 Ver fichero

@@ -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);


Cargando…
Cancelar
Guardar