从Fusion.js的服务器中获取数据

时间:2019-09-04 07:45:08

标签: fusion

使用fusion.js从服务器获取数据

import React from 'react';

import {prepared} from 'fusion-react-async';
import fetch from 'isomorphic-fetch';

async function Example() {
    const name = await fetch('https://voltuswave.com');
    return <div>Hello, {name}</div>;
}

export default prepared(async () => await fetch('/fecthData'))(Example);

0 个答案:

没有答案