Live data from Hacker News

React Makes You Sad?

github.com

51–60 of 211 posts

Re: React Makes You Sad?

#52

React made me sad, so I switched to Mithril[1]. Not only is it significantly smaller in size, but it's way faster and includes a router and AJAX methods out of the box. I wish more people would give it a shot. That said, I do still love React Native, and use React on a daily basis to take advantage of the "write once, run anywhere" paradigm. [1] https://lhorie.github.io/mithril/

Project seems abandoned, no?

Re: React Makes You Sad?

#53

React made me sad, so I switched to Mithril[1]. Not only is it significantly smaller in size, but it's way faster and includes a router and AJAX methods out of the box. I wish more people would give it a shot. That said, I do still love React Native, and use React on a daily basis to take advantage of the "write once, run anywhere" paradigm. [1] https://lhorie.github.io/mithril/

We're currently using Mithril and one of the biggest issues was getting started in it. It's adoption is lacking, making finding people who've had similar issues difficult. Solving every problem yourself is much harder than finding an existing answer on SO.

That said, we still use it, but we're considering moving to React in the future, mostly since its learning curve is a lot less steep and we would be able to iterate faster.

Re: React Makes You Sad?

#54

Lol. I found React interesting, too, but I don't like to read Javascript code, so I rolled my own React-like framework in Scala. Life is so much easier if you don't have to depend on other peoples mess.

...where "other peoples mess" is based on battle-hardened production code from Facebook...

"battle-hardened", yet churns drastically every release?

You and I have different ideas of what battle hardened means.

Re: React Makes You Sad?

#55
post #28

Earlier quoted context omitted.

What were you doing?

Writing a 'driver' to integrate my low level UI component library to be usable with React. My major issue was the 'rule' that a parent can't access the 'state' of it's children; this turned a 2 hour job into a 3 day job for me just trying to find a way to get access to this state through all of the lifecycle callbacks while instantiating children at the same time. When asked in #reactjs, they said that if you need ac…

One of react's core tenets is unidirectional data flow. Trying to use it in a bidirectional way is... painful. There is also a struggle with state vs props. The quick version is that state is internal to a component and is changeable directly by it, and props are given out by the parent and are not directly changeable.

Generally the way the bidirectional issue is solved is by closing the loop via dispatchers and stores. The child components send out actions to the stores, which then flow down through the parent, back in to the child. Turning what used to be a bidirectional flow to a unidirectional flow (sometimes at the cost of a bit of boilerplate for pre-existing components).

I guess the real question is, what is the use for the parent to be able to see the 'state' (the child components internal state)? The answer to that question (in my limited experience) has often been either 'to trigger an event (ex: save a form)' or 'so the parent can make some other rendering decision'. Both of which I've generally been able to solve via a flux implementation and possibly changing a 'state' into a 'prop' in the child (where the child gets a prop, some action is taken, and instead of changing state internally, an event is dispatched to the store with the new data, and the parent rerenders the child with the new 'prop').

But ultimately, hack it how you need. It's your code after all.

Re: React Makes You Sad?

#56

React made me sad, so I switched to Mithril[1]. Not only is it significantly smaller in size, but it's way faster and includes a router and AJAX methods out of the box. I wish more people would give it a shot. That said, I do still love React Native, and use React on a daily basis to take advantage of the "write once, run anywhere" paradigm. [1] https://lhorie.github.io/mithril/

Project seems abandoned, no?

Looks active to me: https://github.com/lhorie/mithril.js/commits/next

Re: React Makes You Sad?

#57

React made me sad, so I switched to Mithril[1]. Not only is it significantly smaller in size, but it's way faster and includes a router and AJAX methods out of the box. I wish more people would give it a shot. That said, I do still love React Native, and use React on a daily basis to take advantage of the "write once, run anywhere" paradigm. [1] https://lhorie.github.io/mithril/

Project seems abandoned, no?

[deleted]

Re: React Makes You Sad?

#58
I want to start using React but I think I'm going to stick with Angular for now. I have all of the gotchas of Angular figured out and I think I want to wait another year for the dust to settle on React. By looking at the flowchart it looks like the React ecosystem is still quite Alpha and learning to grow up.

Re: React Makes You Sad?

#59
post #53

React made me sad, so I switched to Mithril[1]. Not only is it significantly smaller in size, but it's way faster and includes a router and AJAX methods out of the box. I wish more people would give it a shot. That said, I do still love React Native, and use React on a daily basis to take advantage of the "write once, run anywhere" paradigm. [1] https://lhorie.github.io/mithril/

We're currently using Mithril and one of the biggest issues was getting started in it. It's adoption is lacking, making finding people who've had similar issues difficult. Solving every problem yourself is much harder than finding an existing answer on SO. That said, we still use it, but we're considering moving to React in the future, mostly since its learning curve is a lot less steep and we would be able to iterat…

While domvm [1] is young and doesn't have the adoption of Mithril (not even within an order of magnitude), it does solve many issues that people frequently have with Mithril's architecture and magic. Check it out if you'd like. Disclaimer: I'm the author and 1.0 (stable) target is April 1st.

[1] https://github.com/leeoniya/domvm

Re: React Makes You Sad?

#60
post #53

React made me sad, so I switched to Mithril[1]. Not only is it significantly smaller in size, but it's way faster and includes a router and AJAX methods out of the box. I wish more people would give it a shot. That said, I do still love React Native, and use React on a daily basis to take advantage of the "write once, run anywhere" paradigm. [1] https://lhorie.github.io/mithril/

We're currently using Mithril and one of the biggest issues was getting started in it. It's adoption is lacking, making finding people who've had similar issues difficult. Solving every problem yourself is much harder than finding an existing answer on SO. That said, we still use it, but we're considering moving to React in the future, mostly since its learning curve is a lot less steep and we would be able to iterat…

Have you tried the mithril.js gitter channel[1]? It's sort of the de-facto go-to-place for mithril questions; there are lots of active users there who are willing to help you out

You can also drop me a line via email, and I'd be happy to help too.

[1](https://gitter.im/lhorie/mithril.js)

Post reply on HN