import React , { FC , Children , ReactNode } from 'react' ; import { RecoilState } from 'recoil' ; export interface RecoilDevtoolsProps { values ? : RecoilState < any > [ ] ; children ? : ReactNode ; } export const RecoilDevtools = ( { values , children , } ) => { return ( < > { Children . map ( children , ( child ) => { if ( ! React . isValidElement ( child ) ) { return child ; } return React . cloneElement ( child , { values , ... child . props } ) ; } ) } < />); } ;