I have a function component (A) import another function component (B).
B has a onChange value, I want to get the onChange value all the time when I import B in A.
I have no idea how to get it.
Here is the code like this:
A:
import B from './B';
const A = () => {
  // I want to get B's onChange value over here
  return (
    <B />
  );
}
B:
import React, { useState } from 'react';
const B = () => {
  const [value, setValue] = useState('');
  return (
    <SomePicker value={value} onChange={(value) => setValue(value)}
  );
} 
 
    