score:2

Accepted answer
import React from 'react';

const NotificationForm = ({ text, slug, isNotification, handleUpdate }) => {
  return (
    <>
      <h1>{text}</h1>
      <div htmlFor={1}>
        <label>
          <input
            id={1}
            type="radio"
            name={slug} // it must be uniqe for groups and same in one group
            value="true"
            checked={isNotification === true}
            onChange={(e) =>
              dispatch({
                type: 'FETCH_IS_NOTIFICATION_FULFILLED',
                payload: e.currentTarget.value,
                slug,
              })
            }
          />
          Notify me
        </label>
        <label htmlFor={2}>
          <input
            id={2}
            type="radio"
            name={slug} // it must be uniqe for groups and same in one group
            value="false"
            checked={isNotification === false}
            onChange={(e) =>
              dispatch({
                type: 'FETCH_IS_NOTIFICATION_FULFILLED',
                payload: e.currentTarget.value,
                slug,
              })
            }
          />
          Do not notify me.
        </label>
      </div>
    </>
  );
};

export default NotificationForm;

Related Query

More Query from same tag