Async Context Tracking in Node with Async Local Storage API ft. James Snell | JS Drops

Поділитися
Вставка
  • Опубліковано 4 лис 2024

КОМЕНТАРІ • 9

  • @otmanm4095
    @otmanm4095 Рік тому +2

    Didn't know about that! Its super duper cool!

  • @johnm8358
    @johnm8358 Рік тому +2

    Very nicely explained

  • @yakimovev
    @yakimovev 7 місяців тому

    I finally understood! Thanks

  • @RicardoCabral-l9i
    @RicardoCabral-l9i Рік тому

    Very well explained

  • @26Anshu
    @26Anshu Рік тому

    Hi, In your example you have set and access the data within same class. What if we set data in one class and want to access it in another class function invoked from this class?

    • @ThisDotMedia
      @ThisDotMedia  Рік тому

      Hi! As James mentions in the video at 14:45, so long as the ID provided by the declaration of new AsyncLocalStorage() can be shared with the functions, it would be possible.

    • @26Anshu
      @26Anshu Рік тому

      @@ThisDotMedia So, I need to pass the sessionId while invoking the other class function. There is no way to access the data without passing it?

    • @ThisDotMedia
      @ThisDotMedia  Рік тому

      @@26Anshu That's correct- you'll have to pass it.

    • @josht130
      @josht130 11 місяців тому

      Experiencing the same issue, frustrating that we need to propagate the store everywhere