Hi. I’m new here.
I’m currently using BuckleScript but due to recent announcements, I’m considering moving to PureScript where at least I can expect some stability. I actually used Elm before BuckleScript but changed course when 0.19 came out. I hope PureScript is my last stop
I migrated this issue when with me when I moved from Elm to BuckleScript. But I wanted to see if there’s a solution before refactoring to PureScript.
Basically, I have a server resource that’s represented as a list of items. I used RemoteData to represent this list in the front-end. However, the items within the list can be updated individually after a successful fetch. But due to Ajax, I have to wrap the items around Either (or Result in Ocaml). This means that the actual data is wrapped twice and it is thus boilerplaty to handle the data at different points in the codebase; e.g. when updating an item, I have to consider the RemoteData wrapping the list of items.
Would you represent the data differently? If not, do you know a trick/method to reduce the boilerplate?