Echo JS 0.11.0

<~>
xat 223 days ago. link 1 point
A similar example in React, using a Higher Order Component, would look somehow like this:

function createSurveyInput(SurveyComponent) {
  return (props) => (
    <div className="survey-base">
      <h4>{props.question}</h4>
      <SurveyComponent {...props} />
    </div>
  )
}

const SurveyInputText = createSurveyInput((props) => (
  <input type="text" placeholder={props.placeholder} />
))

Replies