Reactjs setState() with a dynamic key name?

Thanks to @Cory’s hint, i used this: inputChangeHandler : function (event) { var stateObject = function() { returnObj = {}; returnObj[this.target.id] = this.target.value; return returnObj; }.bind(event)(); this.setState( stateObject ); }, If using ES6 or the Babel transpiler to transform your JSX code, you can accomplish this with computed property names, too: inputChangeHandler : function (event) … Read more

Use placeholders in yaml

Context YAML version 1.2 user wishes to include variable placeholders in YAML have placeholders replaced with computed values, upon yaml.load be able to use placeholders for both YAML mapping keys and values Problem YAML does not natively support variable placeholders. Anchors and Aliases almost provide the desired functionality, but these do not work as variable … Read more

tech