Describe the bug
When there was template literal used in name of input codemod only removes ref={register} but doesn't create {...register()} and leaves name
To Reproduce
example input before running codemod:
<input
name={`${key.name}.apply`}
type="checkbox"
ref={register}
label="should apply for this key?"
id={`${key.name}.apply`}
/>
After codemod:
<input
name={`${key.name}.apply`}
type="checkbox"
label="should apply for this key?"
id={`${key.name}.apply`}
/>
Expected behavior
<input
{...register(`${key.name}.apply`)}
type="checkbox"
label="should apply for this key?"
id={`${key.name}.apply`}
/>
Describe the bug When there was template literal used in name of input codemod only removes ref={register} but doesn't create {...register()} and leaves name
To Reproduce example input before running codemod:
After codemod:
Expected behavior