Ver código fonte

Modify readme

Add clarification.
master
TheoryOfNekomata 1 ano atrás
pai
commit
a9caf5ffd1
2 arquivos alterados com 3 adições e 1 exclusões
  1. +2
    -1
      README.md
  2. +1
    -0
      packages/iceform-next-sandbox/src/pages/greet.tsx

+ 2
- 1
README.md Ver arquivo

@@ -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 arquivo

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


Carregando…
Cancelar
Salvar