The Remix.run Data Hook Secrets You Need to Know!

Поделиться
HTML-код
  • Опубликовано: 14 ноя 2024

Комментарии • 14

  • @jareddiscipio1768
    @jareddiscipio1768 Месяц назад

    Best remix content on the internet atm. Better than the remix run channel itself. Keep it up man. Greatly appreciated🎉

    • @alemtuzlak
      @alemtuzlak  Месяц назад

      Thank you so much! That is really appreciated!

  • @wk-kln
    @wk-kln Месяц назад +1

    I learned a lot of Remix from you. Please keep posting !

    • @alemtuzlak
      @alemtuzlak  Месяц назад

      Will do, thank you for watching!

  • @prashlovessamosa
    @prashlovessamosa Месяц назад +1

    Great thanks for sharing

  • @KiiraKoko
    @KiiraKoko Месяц назад +1

    Awesome!

  • @Adityacode
    @Adityacode Месяц назад +3

    The fetcher. data is not bound to the components life cycle, which is very annoying sometimes. For example, when i have a dialog with a form and i want to show a toast to the user using the fetcher. data, but when the user closes then reopens the dialog then the toast is shown again. This might seem like a small problem but it hampers both the ux and the dx and i had to use tanstack query's useMutation for it. I also tried a hacky thing by calling a resource route action that returns null to reset the fetcher. data. Is there any elegant solution for this problem?

    • @alemtuzlak
      @alemtuzlak  Месяц назад +1

      Elegant no, but you could create a custom fetcher for this with useState where you have a boolean flag that is reset on a shown notification or something like that, obviously it's a bit hard to say concretely how to handle it without the code but thats the first thing that comes to mind

    • @khanahmad452
      @khanahmad452 Месяц назад

      Will remix-toast solve this problem?

    • @alemtuzlak
      @alemtuzlak  Месяц назад +1

      @@khanahmad452 it could, depending on the code he has 😅

  • @prashlovessamosa
    @prashlovessamosa Месяц назад

    What's coming next.