defundefun
Re:How to avoid rewriting your JavaScript application
on Thursday October 20, 2016 @05:06PM (#12756172)
They change the original title i was just making a reference to that.
Re:How to avoid rewriting your JavaScript application
on Thursday October 20, 2016 @05:05PM (#12756163)
I was talking about the concepts not the languages. There is even an elm paper [1] and the README in the reagent repo is great as well.
Re:How to avoid rewriting your JavaScript application
on Thursday October 20, 2016 @03:37PM (#12755395)
Great article, but i think the op needs to take a look at redux. The best way to use react is to have as little local state as possible. Once you accept that the next question that comes to mind is where should i put all the logic. This article does a good job enumerating the libraries that have been created in an attempt to solve this question [1]. Also when you have all your state in a single global map, you start wishing it would behave more like a database.
The problem with the redux react ecosystem is that it wants to be functional and so it imports a lot of innovations done in functional languages, but in the end js it's not functional and you end up fighting the language. For example the reselect library [2] tries to implement selectors, but without native inmmutable data structures its too painfull to use.
I see a lot of people trying to implement so much features that should have been part of the language as libraries and i ask myself why not just use another language that has all those features, i mean they are all compiling to javascript anyways. Its madness.
[1] https://medium.com/@jeffbski/where-do-i-put-my-business-logi... [2] https://github.com/reactjs/reselect
Re:How to avoid rewriting your JavaScript application
on Thursday October 20, 2016 @02:42PM (#12754983)
Or code like its 2016 and use something like what its proposed by elm, clojurescript's reagent or posh libraries.