Suppose we have this form right here full of key values pairs (i.e. in this case)
const data = {
maxPosts: 9999999,
key: "value"
};
However there can be more key-value pairs and hence more inputs in the picture below.
What is a good way of handling the input change depending on the data given? Because I cannot hardcode all the input handlers like such (as the inputs are dependent on the KV Pairs):
changeKey1: function (event) {
// change state
},
changeVal1: function (event) {
// Change State
},
changeKey2: function (event) {
// Change State
},
Ultimately the user will be editing these values and then press submit to confirm their edit changes. Is there anyway of doing this with React Hooks?