JavaScript/react/React.FC:修订间差异
来自康健生活
| (未显示同一用户的1个中间版本) | |||
| 第3行: | 第3行: | ||
== ajax == | == ajax == | ||
<syntaxhighlight lang="html5" highlight="11 | 在 React.FC 函数中如何调用 await promise 的 ajax 函数 | ||
<syntaxhighlight lang="html5" highlight="11-17"> | |||
import React, { useEffect } from 'react' | import React, { useEffect } from 'react' | ||
import IPStyles from './index.less' | import IPStyles from './index.less' | ||