https://github.com/wubaiqing/zaobao
[文章] urql 是 GraphQL 的客户端;适用于小型和大型的项目,可用于生产环境:https://formidable.com/blog/2019/urql-2019/
[文章] 《用 JavaScript 实现编译器和解释器》的一篇教程:https://hsiaosiyuan0.gitbook.io/icj/part1/1-3-hi
[类库] React Spring 是一个动画库,类似于阿里的 Ant Motion,更多的效果可以打开官网看 Demo:https://github.com/react-spring/react-spring
[资源] 受到 vue-server-render 的启发;该作者写了一篇简单的 React SSR 方案;《 React Server Renderer 》:https://github.com/JounQin/react-server-renderer
[工具] 专利检索及分析的网站,适用于高薪企业申请专利做查询使用:http://www.pss-system.gov.cn/sipopublicsearch/portal/uiIndex.shtml
import { Provider, createClient } from 'urql';
const client = createClient({
url: 'http://localhost:1234/graphql', // Your GraphQL endpoint here
});
ReactDOM.render(
<Provider value={client}>
<YourApp />
</Provider>,
document.body
import { Query } from 'urql';
<Query query="{ todos { id } }">
{({ fetching, data }) =>
fetching ? <Loading /> : <List data={data.todos} />
}
</Query>;
import { useQuery } from 'urql';
const YourComponent = () => {
const [{ fetching, data }] = useQuery({ query: `{ todos { id } }` });
return fetching ? <Loading /> : <List data={data.todos} />;
};