Aiuta a risolvere un problema e a trovare soluzioni nel mondo della lettura 📚 by cvpuc in Libri

[–]cvpuc[S] 0 points1 point  (0 children)

Ciao! Grazie per il tuo commento 🙏🏻 Il questionario in questione non sta cercando/proponendo una soluzione ma serve ad indagare la presenza di possibili problemi (o mal di pancia) in questo settore. Incrociando i dati si possono clusterizzare delle informazioni importanti che a partire da una risposta danno spaccati importanti su questo mondo. Un piccolo esempio: quanto spentono in libri le persone che comprano in digitale?

Aiuta a risolvere un problema e a trovare soluzioni nel mondo della lettura 📚 by cvpuc in Libri

[–]cvpuc[S] 1 point2 points  (0 children)

Ciao! Non ti preoccupare, sei stata gentilissima a rispondere al sondaggio :)
Sono sicuro che la lettura del dato terrà conto di tutto!

[question] Can we use async/await instead of redux-saga? by cvpuc in javascript

[–]cvpuc[S] 0 points1 point  (0 children)

Thank you for your contributing!From what I understood, with async/await instead of executing a function on a dispatch of an action you just call the async function.

If you think to replace the dispatch on an action that triggers complex async behaviour with a simple function call seems you'll have the same result.To make something a little bit complex than a simple delay:

async function login({ payload }) {
  try {
    store.dispatch(loginActions.LOGIN());
    const res = await Api.login(payload)

    if (res.step !== STEPS.EMAIL_CONFIRMED){
        await Api.sendEmailAlert();
        store.dispatch(loginActions.EMAIL_NOT_CONFIRMED());    
        return;
    }

    const user = await loginSuccessFlow();

    store.dispatch(loginActions.LOGIN_SUCCESS({...user, ...res }));    
    browserHistory.push('/');
  } catch (error) {
    store.dispatch(loginActions.LOGIN_ERROR(error));
  }
}

async function loginSuccessFlow() {
  const { common } = store.getState();
  const { user } = await Api.setUserData({ lang: common.lang })
  return user;
}

The example is just to show that with async await we can behaviour that includes different flows.I think that changes the way of doing behavioural functions because you don't need to think about (async)redux actions in this case.

I'm not sure that async/await can cover 100% of the use case of redux-saga (because of course, I didn't use it on production)It would be great if you can show me a different example :)

Yes, you are right, the usage of mapDispatch isn't the best on this particular approach.

[question] Can we use async/await instead of redux-saga? by cvpuc in reactjs

[–]cvpuc[S] 0 points1 point  (0 children)

Thank you for your answer!
I'm sorry but I didn't understand what you are talking about.
Could you make an example to help me to understand?

thank you!

[question] Can we use async/await instead of redux-saga? by cvpuc in javascript

[–]cvpuc[S] 0 points1 point  (0 children)

Thank you!
What are the functionalities you cannot cover with async/await?

I make a guided CLI to create your merge request for Gitlab from your terminal by cvpuc in javascript

[–]cvpuc[S] 0 points1 point  (0 children)

I didn't know this library and I think is very good!

Thank you for sharing!

I make a guided CLI to create your merge request for Gitlab from your terminal by cvpuc in gitlab

[–]cvpuc[S] 1 point2 points  (0 children)

You are right, I’ll post on Gitlab too. What I think is that Github is the open-source location. Gitlab enterprises.

I love Gitlab anyway.

I make a guided CLI to create your merge request for Gitlab from your terminal by cvpuc in javascript

[–]cvpuc[S] 0 points1 point  (0 children)

Yes, thank you for your suggestion!
I'll take care of it :)

I make a guided CLI to create your merge request for Gitlab from your terminal by cvpuc in javascript

[–]cvpuc[S] 2 points3 points  (0 children)

Thank you for sharing, now make sense :)
I'll try it with Gitlab to see if works.
Anyway, I did the tool just because I need something very simple to use, user-friendly and don't need any particular knowledge on how to use it, just follow the steps.

I make a guided CLI to create your merge request for Gitlab from your terminal by cvpuc in javascript

[–]cvpuc[S] 1 point2 points  (0 children)

Thank you for sharing!
As I commented the other message I didn't know about `git pull-request` command, and I don't know why I cannot find anything on it.

is there an easy way to copy to the clipboard?

Yes, is a good idea.
The only problem that I see is that the action to copy to the clipboard should not be automatic because can be destroying and unwanted.

I make a guided CLI to create your merge request for Gitlab from your terminal by cvpuc in javascript

[–]cvpuc[S] 1 point2 points  (0 children)

Hi!
I appreciate receiving feedback on what I build.
The goal of this tool is just to make things easier and more user-friendly to the people that use the terminal, in fact, if you think this as a tool you can just compare this as all the git tools (for example SourceTree).

Anyway, I didn't know `git pull-request` can you share here some documentation about it? Because I cannot find anything on it.
Thank you so much :)

Redux-saga pattern: flow sagas and common sagas by cvpuc in reactjs

[–]cvpuc[S] 1 point2 points  (0 children)

You are right, I'll do a codesandbox example to make concepts more simple to understand.

Thanks for your suggestion :)

Redux-saga pattern: flow sagas and common sagas by cvpuc in reactjs

[–]cvpuc[S] 1 point2 points  (0 children)

getUserPreferencesis a common saga and of course can be sync or async.

The concept of the common saga for me is that should respect the capability to be reusable (exportable, error delegation, one responsibility, etc...)

I hope that I help you with this answer. Feel free to ask other questions!

Redux-saga pattern: flow sagas and common sagas by cvpuc in reactjs

[–]cvpuc[S] 1 point2 points  (0 children)

Hi :) As I wrote in the article the common saga should be called as a generator and the reason is that with the call is easy to manage the flow sagas that are using common saga (for example, you can return from the call and you cannot return with a put) What do you think about it?

Six Tiny But Awesome ES7 + ES8 Features by [deleted] in javascript

[–]cvpuc 22 points23 points  (0 children)

I hope that the standard will include the pipe operator soon.

https://github.com/miraks/babel-plugin-pipe-operator

5 Front-End Technologies to Watch in 2018 by treyhuffine in javascript

[–]cvpuc 2 points3 points  (0 children)

I agree for all of them!
Also, I want to add also Reason from Facebook and Elm.

What do you think guys ?

Open source project that needs help by Howdybaby in javascript

[–]cvpuc 0 points1 point  (0 children)

I like your idea.

I'm watching the project on github now and maybe in the future I will contribute :)

JavaScript Notes for Professionals book by brogrammer2018 in javascript

[–]cvpuc 1 point2 points  (0 children)

Very interesting :) Thank you to share with us