title: react handle value change
body: <p>I have  a react code. There is a radio button. When a value is selected, 'handleChange' method is called. The new radio button selected value is correctly printed.</p>
  
  <p>From handlechange, i am unable to pass value to updateCustomerConfiguration . This method will call my editCustomerConfig redux action to send data to back end.  editCustomerConfig  method is not even called.</p>
  
  <p>updateCustomerConfiguration  method console log prints blank value .</p>
  
  <p>I get error 'Unhandled Rejection (Error): Actions must be plain objects. Use custom middleware for async actions.'</p>
  
  <p>How do i pass in the value to updateCustomerConfiguration  ?</p>
  
  <pre><code>const [value, setValue] = React.useState('');
  
  const handleChange = event =&gt; {
      setValue(event.target.value);
      console.log("handleChange 2:",event.target.value);
      updateCustomerConfiguration(value);
  };
  
  const updateCustomerConfiguration = async () =&gt; {
      console.log("updateCustomerConfiguration:"+value);
  
      let payload = { value };
      const result = await editCustomerConfig(payload);
  }
  
  
  
  &lt;RadioGroup aria-label="gender" name="gender1" 
          value={value} onChange={handleChange}
          &gt;
  &lt;/RadioGroup&gt;
  </code></pre>