Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 15:05
    neurosnap commented #2360
  • 15:04

    neurosnap on main

    Update effects.d.ts code docs t… (compare)

  • 15:04
    neurosnap closed #2360
  • 15:04
    neurosnap commented #2360
  • 15:03
    neurosnap commented #2360
  • 14:49

    dependabot[bot] on npm_and_yarn

    (compare)

  • 14:48
    dependabot[bot] commented #2361
  • 14:48
    neurosnap closed #2361
  • Feb 03 23:15
    shaunwhyte edited #2360
  • Feb 03 22:27
    shaunwhyte edited #2360
  • Feb 03 17:53

    dependabot[bot] on npm_and_yarn

    Bump http-cache-semantics from … (compare)

  • Feb 03 17:53
    changeset-bot[bot] commented #2361
  • Feb 03 17:53
    dependabot[bot] labeled #2361
  • Feb 03 17:53
    dependabot[bot] opened #2361
  • Feb 03 00:50
    changeset-bot[bot] commented #2360
  • Feb 03 00:50
    shaunwhyte synchronize #2360
  • Feb 03 00:16
    changeset-bot[bot] commented #2360
  • Feb 03 00:16
    shaunwhyte opened #2360
  • Jan 31 21:43
    Andarist commented on fdca798
  • Jan 31 21:32

    dependabot[bot] on npm_and_yarn

    (compare)

Tew Tawan
@tawanorg
Guy, need some help. I want to use 'useApolloClient' in saga context, how can I do that? Any recommendation? I trying to create saga middle or redux middle to use setContext but not working as I expected.
Henrique Barcelos
@hbarcelos

Hey guys, I have a more of a conceptual problem I've been struggling with in the past couple of days.

I have to subscribe to N event streams and react to the events occurring in them. Those are standard Node-like event-emitters.
I also have a facade API which should merge those N event streams together into a single one.
My initial thought was to convert the subscription into an async generator:

  async function* subscribe({ fromBlock = 0, toBlock = 'latest', filter = {} } = {}) {
    let res;
    let rej;
    let promise = new Promise((resolve, reject) => {
      res = resolve;
      rej = reject;
    });

    const subscription = linguo.events.allEvents({ fromBlock, toBlock, filter });
    subscription
      .on('data', event => {
        res(event);

        promise = new Promise((resolve, reject) => {
          res = resolve;
          rej = reject;
        });
      })
      .on('error', err => {
        rej(err);
        promise = new Promise((resolve, reject) => {
          res = resolve;
          rej = reject;
        });
      });

    while (true) {
      try {
        const event = await promise;
        yield event;
      } catch (err) {
        console.warn(`Canceling event subscription for contract ${linguo.options.address}`, err);
        break;
      }
    }

    subscription.unsubscribe();
  }

Then to combine the multiple subscribe() calls, I've found this merge operator from the repeatable library.

Then I happily wrote my saga:

export async function* subscribeSaga(action) {
  const { fromBlock, toBlock, filter } = action.payload ?? {};

  const linguoApi = yield getContext('linguoApi');
  const subscription = yield call([linguoApi, 'subscribe'], { fromBlock, toBlock, filter });
  for await (const evt of subscription) {
    console.log('>>>', evt);
  }
}

Only to find out then that redux-saga does not support async generators :/

Any ideas?

Mihai Moraru
@mihaimoraru19
Hi guys, I just posted an article on medium about a simple way of using redux saga (+ reduxsauce). Check it here. I'd appreciate any feedback.
Cooper Maruyama
@coopermaruyama
Is there an idiomatic way to replace the following super common pattern with redux-saga?
componentDidUpdate(prevProps) {
  const didIdChange = prevProps.id !== this.props.id;

  if (didIdChange) {
   this.props.fetchData(this.props.id);
  }
}
Gursewak Singh
@gursewak11
Hi, I am using saga, and its rendering twice I don't understand the reason
image.png
Here is a screenshot of the response and it's happening only on testing server
FFA
@Singtah

Hey guys,
Any idea why my second argument externalData is rejected in sagaMiddleware.run(rootSaga, externalData); ?

Tells me that .run takes 1 arg only but the doc doesn't say so

Ambika Kumar
@ambikarajbadal
Hello Developers,
What is the best and secure approach to store logged-in user information in React redux application. please help me.
Tim
@timsofteng
image.png
Hey guys. Why this does this retry work only one time?
I suppose it should work three times
Acoder-Ana
@Acoder-Ana

Hi developers
We are Ukraine based IT startup and we are looking forward to hiring 2 (two) React.js developers in a few days.
Recruitment process is simple.

  1. There is a small test project to get qualified.
  2. Once you have finished the task, you will be required to send your CV.

If you are interested, DM me
Regards.
Andrei

Kyrylo. K
@Kyrylo-K
Hello, everybody
I want to know the differences between Redux-thunk and Redux-saga correctly
Create MERN App
@mernjs

Hello Everyone, MERN Stack Boilerplate provides starter kits for building web, desktop and mobile apps in pure JavaScript.

https://www.npmjs.com/package/create-mernjs-app

If you have any query or suggestions. Please let me know.

sairam1318
@sairam1318
Hey Guys, can we call a custom hook inside saga?
Create MERN App
@mernjs

Hello Everyone,

MERN Micro Framework provides starter kits for building web, desktop and mobile apps in pure JavaScript.

https://www.npmjs.com/package/create-mernjs-app

If you have any query or suggestions. Please let me know.

Full Stack Developer
@LuckyGuy1024
Hello, Everybody. Nice to meet you.
I'm a developer from Hong Kong with 6 years experience in React, Redux.
Seif Eddine Slimene
@SeifESlimene
Hi
Seif Eddine Slimene
@SeifESlimene
I need someone for pair programming.
topcoder
@topcoder0108
Hi
Nice to meet you.
Seif Eddine Slimene
@SeifESlimene
Nice to meet you too!
Kizito Njoku
@nkizito92
Hi Just join how is everyone
New to Redux Saga here
and I'm trying out createSlice for the reducer
Kizito Njoku
@nkizito92
Hey is this a common practice for the saga post action
function* workGetCardsFetch() {
    const cards = yield call(() => axios.get('http://127.0.0.1:8000/'))
    yield put(getCardsSuccess(cards.data))
}
# Post action starts here
function* workCreateCard(action) {
    try {
        const word = action.payload
        const options = {headers: { "content-type": "application/json" }}
        yield call(() => axios.post('http://127.0.0.1:8000/words/new/', { word }, options))
# I  added yield workGetCardsFetch() to reload the data 
# because the state in the reducer doesn't receive the new id created in the backEnd from a post request.
        yield workGetCardsFetch()
    } catch (error) {
        console.log(error.message)
    }
}
Create MERN App
@mernjs

Hello Everyone

Set up a modern web, mobile & desktop app by running one command.

https://www.npmjs.com/package/create-mernjs-app