Better HN
topnewbestaskshowjobs
Log inSign up

defundefun

9 karma · joined Oct 20, 2016 (10y ago) · 5 submissions

Submissions

comment 10y ago · link · parent

They change the original title i was just making a reference to that.

comment 10y ago · link · parent

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.

[1] http://elm-lang.org/papers/concurrent-frp.pdf

comment 10y ago · link · parent

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

comment 10y ago · link · parent

Or code like its 2016 and use something like what its proposed by elm, clojurescript's reagent or posh libraries.