In the following form input code I am using the property name as static value and it works:

```
       <input      
        name={inputName}
        type="text"
        placeholder={placeholder}
        value={value}
        onChange={(e) =>
          setValue((prevState) => ({
            ...prevState,
            customerName: e.target.value,
          }))
        }
        style={{ fontFamily: "Jameel Noori Nastaleeq" }}
        readOnly={readOnly}
      />

```

While if I try to use it as a dynamic value that's passed to this component as a prop, it doesn't work how can I do that?

Dynamic value incorrect code:

```
      <input
        name={inputName}
        type="text"
        placeholder={placeholder}
        value={value}
        onChange={(e) =>
          setValue((prevState) => ({
            ...prevState,
            ${`valueNameToUpdate`}: e.target.value,
          }))
        }
        style={{ fontFamily: "Jameel Noori Nastaleeq" }}
        readOnly={readOnly}
      />

```