How to create a handler function which 'handles' multiple textfields but also character counter textfields as well
问题 this is a continuation of: How to use a handler function for two different purposes. SPFX (React/TypeScript) which I've made a little progress from, so this isn't a duplicate, it's part 2 as it were. My current code handler is: const {value} = (evt.target as any); const countKey = `${evt.target.name}Count`; const obj = { [evt.target.name]: value, [countKey]: value.toString().length, }; this.setState({ ...this.state, obj }, () => { console.log(obj), console.log(countKey+'countKey'), console