Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

About 2.0.0 #738

Closed
MaximeBernard opened this issue Nov 16, 2020 · 14 comments
Closed

About 2.0.0 #738

MaximeBernard opened this issue Nov 16, 2020 · 14 comments

Comments

@MaximeBernard
Copy link
Collaborator

I've been using redux-observable for quite some time now (and think everyone should) and love that ofType operator 馃憣 (cleaner TS & cleaner RX)

2.0.0-alpha.0 has been released for 1 year now and still no "stable" release.

  1. Do you have any roadmap in mind?
  2. Do you have any blocker?
  3. So far, I've used 2.0.0-alpha.0 and didn't find any issue. Why not release it "as is" yet?
  4. Do you need any help?
@NateAGeek
Copy link

Honestly since this has not really been met with a response worries me. Is there some actual committee of some sort?

@jayphelps
Copy link
Member

jayphelps commented Apr 8, 2021

@NateAGeek no committee. There have been a few people who have helped out here and there--been very grateful for them. Ultimately this project is in maintenance mode as I don't currently work on any UI projects myself right now. I didn't release 2.0 because at the time I didn't have cycles to support any potential problems that might arise after the release; which, in my experience, is common when you do make breaking changes as it does. Whereas the current "stable" release is battle hardened and the typical quirks you'd expect to find well known, relatively speaking. The docs would need to be updated to reflect the changes still. They're not massive, but I just don't have the cycles. I've asked a few people who use the project if they'd like to become maintainers, but none have. Which, really, isn't unexpected considering the time it can take if you're truly active with it. If someone wants to volunteer, lmk.

Knowing that, if someone has a legit counter argument for releasing 2.0.0 final, I'm open to hearing them. But (this goes to anyone, not just the people in this thread) not willing to listen to attacks. This is open source, and there is no warranty expressed or implied. Claiming contrary only pushes me further away from wanting to help. I caveat that because part of the reason I have stepped back from open source in general is the abuse and take-without-giving attitude of so many; though I've also been busy with my own startup and haven't worked on a redux project in some years.

@jayphelps
Copy link
Member

jayphelps commented Apr 8, 2021

@MaximeBernard

Here are my current thoughts to your questions:

Do you have any roadmap in mind?

I do not, unfortunately. I'm not currently working on any UI at all (I'm mostly working on compiler stuff related to my startup) and also haven't worked on an app that needed redux in several years.

Do you have any blocker?

Before, it was mostly around that several people wanted other changes in 2.0 that I hadn't gotten to yet and didn't have time for. Now it's mostly that I know if I release 2.0 as stable, it's what people will use by default, which means if there are new problems, I'd have to either support them or ignore them. The current stable version, on the other hand, is quite stable. And though it does have quirks (as all libraries do) they're quite minor IMO.

Also the docs need some changes, but they're relatively minor (I think?)

So far, I've used 2.0.0-alpha.0 and didn't find any issue. Why not release it "as is" yet?

Same answer as above.

Do you need any help?

Would love some if you still happen to have time! No pressure, of course. This is all volunteer work. If you're interested in helping, or even becoming a maintainer, you can reach out through email (in profile) or Twitter DMs.

@NateAGeek
Copy link

@jayphelps I'm sorry to hear the struggle with "take-without-giving attitude", and I know this is one of the issues with open source projects. I did not want my comment to push that narrative, however, I just was not sure about the state of the project. I appreciate the time and thank you for responding to my question.

I hope to offer support if my personal project kicks off. Best of luck with your startup and thank you again for the time and clarification.

@jayphelps
Copy link
Member

@NateAGeek Thanks!

@everyone I added a note in the README in this PR if anyone has feedback: #744

@evertbouw
Copy link
Member

I'm also no longer working with redux-observable after switching jobs. Feel free to tag me in issues/PRs tho

@wirdehall
Copy link

wirdehall commented Jun 24, 2021

I have been working with Angular for the last 2 years due to customer requirements.
In those years I have been working with NgRx and using observables as side-effects and learned to love it.
Now I'm most likely going back to React and are looking for basically this repo as it provides what I'm missing in Redux.

I see that it's in maintenance mode tough and I'm uncertain if it's a good idea to pick it up.

  1. Would you still recommend people start new projects with this?
  2. Do you intend to keep the deps up to date if RxJs or Redux versions bump for the foreseeable future?

@jayphelps
Copy link
Member

jayphelps commented Jun 24, 2021

@wirdehall as of right now, I have no reason to believe Redux or RxJS will make changes that are significant enough that I or another maintainer wouldn't make the minor changes to accommodate. I'm also not aware of any plans for any breaking changes that would impact it. So from that perspective, I wouldn't expect any issue with using redux-observable.

That said, it is indeed in maintenance mode, and ultimately was even back when I was still maintaining UI projects that used it, because it's a relatively simple library and I've wanted to keep it that way. So there has never been whole lot to change. The biggest complexity was stuff introduced in 1.0 around now using the QueueScheduler because rarely some folks would create extremely complex async scenarios where we found using the QueueScheduler provided a more intuitive experience (unless you actually start thinking about it, then it gets confusing af because scheduling is.)

So if that behavior isn't really needed for you--as it isn't for a vast majority of users--and you wanted a redux-observable-like pattern without actually depending on a library that is in maintenance, it's pretty simple to whip up yourself: (untested)

function createEpicMiddleware() {
  const epic$ = new Subject();
  const epicMiddleware = (store) => {
    const actionSubject$ = new Subject();
    const stateSubject$ = new Subject();
    const action$ = actionSubject$.asObservable();
    const state$ = stateSubject$.asObservable();

    epic$
      .pipe(mergeMap((epic) => epic(action$, state$)))
      .subscribe(store.dispatch);

    return (next) => {
      return (action) => {
        const result = next(action);

        stateSubject$.next(store.getState());
        actionSubject$.next(action);

        return result;
      };
    };
  };

  epicMiddleware.run = (rootEpic) => epic$.next(rootEpic);
}

Naturally, the next question is why anyone would use redux-observable at all then. For similar reasons to use Redux instead of just using RxJS's scan() to the same effect: it handles some edge cases, includes friendly validation errors for incorrect usage, and documentation is available that might not otherwise stay in sync with anything custom you did.

Ultimately if it were me, I'd take a look at the source code of redux-observable and figure out "is this something I could maintain myself if I needed to" and if not, then I'd consider alternatives more seriously. That's what I generally do anyway with any project, since open source maintainer abandonment is extremely common for perfectly valid reasons.

@jayphelps
Copy link
Member

FYI 2.0.0 has been released.

@wirdehall
Copy link

wirdehall commented Jun 24, 2021

@jayphelps Amazing answer. Thanks alot!
I will definitely do as you suggested and check out the source code, and might use your example as a base for writing my own middleware.
It's hard to think back to a time without rxjs, and I can't understand how this isn't the standard over Redux-saga.
Thanks for your effort and hard work!

@getkey
Copy link

getkey commented Jun 24, 2021

@wirdehall I made my own redux-observable-like library because I wanted to use the pattern with another state management library. Here it is if you want to have a look https://github.com/getkey/epix to guide your own middleware (Jay's snippet above is great too!).

When I'm working with Redux I still use redux-observable, it's not actively developed but I don't need it to be since I don't have any complaints with its current state. 馃檪

Btw, great to hear 2.0.0 is out, thanks @jayphelps!

@paritosh149
Copy link

Just out of curiosity, I found that the latest release tag is not visible on the repo page -> Release section.
Screen Shot 2021-06-29 at 8 33 56 pm

@jayphelps
Copy link
Member

@paritosh149 hmm that screenshot is unclear what you're referring to. But on the Releases section I do see 2.0.0. How about you?

image

@paritosh149
Copy link

@jayphelps, I was referring to something similar to Releases section in below screenshot where release tag is more prominent and detailed.

Screen Shot 2021-07-04 at 3 31 39 pm

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

No branches or pull requests

8 participants
@wirdehall @jayphelps @NateAGeek @MaximeBernard @evertbouw @getkey @paritosh149 and others