I've a `isView` and `setIsView` in the `ParentComponent` and passing them down to the `ChildComponent` as `props` and trying to do show/hide conditional rendering but `setIsView` seems not to be working and `isView` value in the props remains same.

```
const ParentComponent = props => {
    const [isView, setIsView] = useState(true);

    const onChange = selectedOption => {
        selectedOption === 'Report'
            ? setIsView(true)
            : setIsView(false);
    };

    return (
        <div>
          <ChildComponent
             isView={isView} 
             onChange={onChange}
           />
        </div>
    );
};

const ChildComponent = props => {
    const {isView, onChange} = props;

    return (
        <div>
          <RadioButton 
             onChange={() => onChange('Not-Report')}
           />

           <If condition={isView}>
               <ChildComponent2>
           </If>
        </div>
    );
};

```

Edit: changed `onChange={onChange('Not-Report')}` to `onChange={() => onChange('Not-Report')}` as suggested by some. still not working.