- 博客(2)
- 收藏
- 关注
原创 React Context API学习笔记
React Context API 学习笔记创建Context ProviderContext provides a way to pass data through the component tree without having to pass props down manually at every level.基本概念- React.createContext()- Provider - Consumer import React from 'react';const Sup
2021-03-08 11:19:39
79
原创 useFetch React 自定义钩子
React 自定义钩子第三方请求 (Fetch第三方数据)基础版import React, { useState, useEffect } from 'react';const useFetch = url => { // 返回值, 加载状态, 错误值 const [response, setResponse] = useState(null); const [loading, setLoading] = useState(true); const [error, setError]
2021-03-04 15:16:43
409
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人