A quick start guide for using Convex with Next.js

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

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

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

    Happy there was a schema was worried, the action for api seems pretty cool, its like a typescript backend, its the first time i got exposed to it

  • @user-ju7ip7jv9u
    @user-ju7ip7jv9u Год назад +2

    Right now I'm using clerk and drizzle orm to do some of these stuff together with tRPC. But definitely I'd use this on my next projects.

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

      Why not use prisma over drizzle

  • @ezwa
    @ezwa Год назад +1

    oh nice. i was planning to use firebase for the websocket feature. this is a good alternative, ill definitely give this a try

  • @EricMilfont
    @EricMilfont 7 месяцев назад

    I've just tested it and it looks awesome! Thanks

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

    Do you have or would do a video on react-query with nextjs app router? I've found a experimental package, but it has poor SEO :( Maybe there ist "THE" way?

  • @relaxwithai
    @relaxwithai Год назад +1

    I love the approach of convex, but I'm only abit concerned about vendor locking

  • @siosaiafonua9286
    @siosaiafonua9286 9 месяцев назад +1

    so is there no need for api routes with nextjs since convex does its own thing? or?

    • @WebDevCody
      @WebDevCody  9 месяцев назад +1

      Yes that’s correct

  • @personal1872
    @personal1872 26 дней назад

    how can i use convex mutation inside nextjs api, i am trying to implement custom oauth callback for github to /api/github/callback and here i am able to fetch github user data, now i want to insert / fetch data from convex database to check if already exists or to create new user

    • @WebDevCody
      @WebDevCody  26 дней назад

      Personally I’d use convex http endpoints and have the webhook invoke convex. If not, you can use the convex node sdk to invoke mutations

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

    Good job babe!!!

  • @saidabedi2836
    @saidabedi2836 6 месяцев назад

    Great content! Apologies if you mentioned it somewhere else, but what is the vscode theme you are using?

    • @WebDevCody
      @WebDevCody  6 месяцев назад

      bearded theme stained blue

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

    Alrighttyyyyy fine.

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

    Hey Cody, which theme are you using for VSCode

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

    What if i have the need to run plain sql against the convex db,is that accessible somewhat by, lets say, a java jdbc connection?

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

      convex has a rest api you can hit I believe, but no you can't run raw SQL because they are not running a sql database from what I understand

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

    I swear I’m developing dyslexia, or some thing because I could have sworn I heard you say that there is a Hackathon being hosted by convicts!

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

      😂😂

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

      Lmaoooooooo that would be pretty interesting tho 👀

    • @WebDevCody
      @WebDevCody  Год назад +4

      the winner gets to a free day-in-the-life by spending the night in jail

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

    Whats the advantages of using this over trpc? (also looks like Convex replaces both tRPC and Prisma at the same time?)
    Edit: also it looks like this connects to a websocket as well (im guessing to prevent loading states in the application?)

    • @WebDevCody
      @WebDevCody  Год назад +1

      Yeah the data store is built into the backend functions, websockets give you real time updates as data changes

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

      Hi, Why do we need scheduler to call thirdpartyapi ?

    • @WebDevCody
      @WebDevCody  Год назад +1

      @@farfazzi you can invoke an action directly from your ui, but the idea is mutations are atomic so you can’t run non deterministic code in them, hence you have to schedule actions

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

    So, its very similar to Graphbase, right?

  • @ATLAS_2002
    @ATLAS_2002 7 месяцев назад

    Can someone enlighten me about how can i delete documents based on some fields? I mean is there any better way than, querying the table to find the id and then ctx.db.delete(id)?

    • @WebDevCody
      @WebDevCody  7 месяцев назад

      If you need t li query by certain fields you should be using an index. Put a composite index on the table for the main fields you need, query for the items you need, filter down by more fields if needed, then update the ones you need by id. No there is no patch where clause, but I don’t find it too hard to write your own helper function to achieve what you need. Also they have something new called convex ents which might make dealing with the models easier

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

    so no more express js and postgres?

  • @siosaiafonua9286
    @siosaiafonua9286 9 месяцев назад

    what are the cons and limitations of Convex?

    • @WebDevCody
      @WebDevCody  9 месяцев назад

      good questions, I'll think about it

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

    what icon pack are u using on vscode?

  • @abdullahislam
    @abdullahislam 7 месяцев назад

    How would you do an upsert in convex?

    • @WebDevCody
      @WebDevCody  7 месяцев назад

      Get the record, modify the data, call patch on record

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

    Their hobbyist plan is gracious and I like that. However, I don't think I like the idea of abstracting so much stuff away from the developer when everything was already so abstracted. It makes our lives easier for sure but at the cost of feeling less like a developer.

    • @xixixao
      @xixixao Год назад +5

      A lot of us at Convex worked at big tech companies, and the abstractions we're building are similar to the ones used there. Being focused on your app and your business logic definitely doesn't make you less of a developer! :)

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

    First