react hooks子组件向父组件传参
子组件
import React, { useState, useContext } from 'react';
import { ChildrenContext } from '../index';
import { Button } from 'antd';
export const Children= (props) => {
const { setParent } = props;
const baseval = useContext(ChildrenContext);.
原创
2020-10-09 18:54:51 ·
5952 阅读 ·
2 评论