Query params with TypeScript

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

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

  • @PastaInformatyki
    @PastaInformatyki Год назад +3

    Thanks for the video, I like the ground up style that is has. I had to work with query params too and it turns out that this type is not really nextjs specific and is also defined in node standard library. It can be accessed like so:
    import { ParsedUrlQuery } from "node:querystring"

    • @RyanToronto
      @RyanToronto  Год назад

      Oh awesome, that's great to know!

  • @Aaron-qy7vb
    @Aaron-qy7vb Год назад +1

    Welcome back @Ryan. We missed you

    • @RyanToronto
      @RyanToronto  Год назад +2

      Thanks Sushan! It's good to be back!

  • @kamill34
    @kamill34 11 месяцев назад

    lets assume that we have a multistep form, each step contain some select based on data from database, each step is saved on query params because it's run on server side. Ryan what do you think about this approach ?

    • @RyanToronto
      @RyanToronto  11 месяцев назад +1

      Yup, that sounds like a great approach!

  • @icaro_rdp
    @icaro_rdp Год назад

    Thanks!

  • @cb73
    @cb73 8 месяцев назад

    You should also be able to use the “Record” type instead: Record

  • @mahmoudelshazly3836
    @mahmoudelshazly3836 11 месяцев назад

    or you can just use zod right!?

    • @RyanToronto
      @RyanToronto  11 месяцев назад

      Haha! You can always just use Zod ;)

  • @som.shekhar
    @som.shekhar Год назад

    Small Nit: When you've already checked if `list` is an array, then you don't need the optional chain anymore.