Rank 2: Process
requests are being sent but the users are not getting created , maybe i think my code could be possibly wrong
Votes
0
Replies
24
Participants
Unknown
Messages
25
Rank 2: Process
requests are being sent but the users are not getting created , maybe i think my code could be possibly wrong
Rank 2: Process
i followed this just coz' it was sponsored by appwrite
Rank 2: Process
should I use things like axios ??
Rank 2: Process
and I was** unable to find a guide for using next js with appwrite**
hey @Berserker
Why don't you try this: https://github.com/sanny-io/react-appwrite
Rank 2: Process
lemme check
Rank 2: Process
thnx bro
Rank 2: Process
@joeyouss is there any work around ?
Rank 2: Process
@safwan bro how to use this package , i meant what this package will do ?
Admin
First off, I highly recommend avoiding server-side rending if possible. server-side rendering it makes your app significantly more complicated because you have to manage sessions on the client AND on the server.
Back to your error, though....what's your code in ./src/app/components/appwrite[server].js? The error says you're using await somewhere that isn't allowed.
Rank 2: Process
@Steven may I know y SSR is bad
Rank 2: Process
Okie
Admin
server-side rendering it makes your app significantly more complicated because you have some code running client side and some code running server side. if you have a session with some external API on the client side, your server-side code won't automatically have it. you need to manage that yourself.
Rank 2: Process
Okie got it sir , i thought SSR would make things fast and thank u
Rank 2: Process
@safwan here is the file
Rank 2: Process
Admin
i think there are 2 benefits to SSR:
However, it makes the app significantly more complicated for the reasons I mentioned.
Rank 2: Process
okie sir as a beginner , then I have to go with client side i think so
Admin
so you have an await there that's not in a function. that's not allowed
Rank 2: Process
okie lemme fix it
Rank 2: Process
@Steven then can i do the stuffs like creating database **from the client side itself **; using sdk
Admin
No, I typically do that with an Appwrite Function. You can try to do that with a NextJS server side endpoint, but you may need to manage access to your endpoint yourself
Rank 2: Process
@Steven Then I'll go with appwrite function itself , i don't wanna put myself into trouble
Rank 2: Process
@Steven again thnk u sir