#hello is there a preferred way or can I
1 messages · Page 1 of 1 (latest)
Hi @naive aurora. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
for app dir route handlers
Sorry @naive aurora, I seem to be having a bit of trouble. Don't worry though, I've pinged my supprt and they will try to fix me up! :technologist:
Perhaps try again in 15mins?
If you're using route handlers, functionally the only difference is using params or searchparams. In the pages folder, they're both params.
Is that route being clicked on by a user, or are you just using it as an api route?
thanks @placid igloo , it's a route clicked by a user from their email inbox
I was just thinking it might be better handled on the page level, params are also available with a hook in client components.
hmm, interesting. I'll look into this, thanks tons!
I realized I was stuck in the separated client / server mindset from when I was starting to learn MERN last year. I keep forgetting I can access backend resources in the server components. Thanks!
Next + React 18 really unlocks a whole new arch pattern, so it really makes you consider where when and how you do things that were previously only able handled in one place. This is a good read as well which explains more of what next is doing under the hood in context.