Echo JS 0.11.0

<~>
tracker1 2657 days ago. link parent 1 point
I mean direct render method components... you don't have to inherit from Component or use the legacy method at all if you don't want to.

    export default MyComponent(props, context) {
      return <div>Hello {props.name}!</div>
    }

Replies

MaxArt 2656 days ago. link 1 point
Are you of that party that thinks that every component could (and should) be defined like that?
I'm not React expert but I find it quite a stretch, because there are components that just need internal state, but it's too verbose/cumbersome/overkill to rely on Redux (or anything like that) for the case. Is there a best practice guide for that?
tracker1 2655 days ago. link 2 points
No, I'm not opposed to the Class-oriented interface though... I think it makes writing stateful components easier.  I'm pretty pragmatic about it, I'd rather have clean code that makes sense than subscribe to dogma. That said, I do tend to favor the functional render component most of the time.
MaxArt 2655 days ago. link 1 point
Yeah that was my basic idea too. Thanks!