ecmascript 6 - ReactJS MaterialUI can I pass a parameter of an element into a function in another parameter? -
using reactjs + materialui formsy-material-ui.
for example if wanted pass in value of blah
defaultselected
value in radio button group.
<formsyradiogroup name="radio" classname="radiobtns" blah="blah blah" defaultselected={somefunction(blah)} >
thanks
if 'blah' static, why don't use defaultselected={somefunction("blah blah")}
, if it's dynamically getting value, pass in state or variable 'blah' getting value, function. blah={this.state.blah}
defaultselected={somefunction(this.state.blah)}
Comments
Post a Comment