Skip to content
This repository has been archived by the owner on May 30, 2020. It is now read-only.

Why strings? #2

Open
jasonzoladz opened this issue Mar 10, 2016 · 3 comments
Open

Why strings? #2

jasonzoladz opened this issue Mar 10, 2016 · 3 comments

Comments

@jasonzoladz
Copy link

Redux doesn't require that your actions must be an object of the form { type : 'STRING_ACTION' }. Why did you choose not to employ an ADT instead?

Btw, I'd like to see this library grow. Please let me know if there's anything I can do.

@brakmic
Copy link
Owner

brakmic commented Mar 10, 2016

Hi @jasonzoladz

There's no explicit reason why I used strings. A few months ago I started to learn PureScript.
And Redux, among my other PS-Projects, was one of the 'Playgrounds' I used to learn the language.

Sure, ADTs are much better and more idiomatic anyway.

I never thought this small project would be of any value to others as Redux already has a great community and the people there are building remarkable things with JavaScript.

I'm not saying that this wouldn't be possible with PureScript, quite the contrary. But the fact is that React, Flux, Redux and all the other stuff is JavaScript-by-default.

However, if you'd like to work on these bindings for PS I welcome you and would be glad to incorporate your pull-requests. 👍

Kind regards,

@jasonzoladz
Copy link
Author

So I wanted to move away from redux as it seems like a specialization of the more general RxJS. Here's an implementation using RxJS (with ADTs for Actions and Effects): https://github.com/jasonzoladz/purescript-rx-state

@brakmic
Copy link
Owner

brakmic commented Mar 13, 2016

Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants