A poorly done React component (mixing props and state?) and what looks to be a poorly done Vue component (with some jQuery lib thrown in?), are the basis of the opinion? Seems weird.
const MyList = props => (
<ul>
{props.list.map((item, index) => <li key={index}>{item}</li>)}
</ul>
);
...
<MyList list={[ 'item1', 'item2', 'item3' ]} /> this.state = {
value: this.props.value || '',
}So, that snippet is actually valid - presumably they want to initialize the internal state value based on the corresponding prop, and use an empty string if it doesn't exist.