Echo JS 0.11.0

<~>
mgrahamjo 2906 days ago. link parent 1 point
1) What do you mean by functional representation? One of the reasons I stopped using React is that its components rely on inheritance, and I prefer functional JS.
2) You can use JSX with Vue.

Replies

tracker1 2905 days ago. link 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>
    }
MaxArt 2904 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 2903 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 2903 days ago. link 1 point
Yeah that was my basic idea too. Thanks!