Next.js Discord

Discord Forum

client or server

Unanswered
Dutch posted this in #help-forum
Open in Discord
DutchOP
Please help. In app directory for a file clientComponent.jsx :
'use client';
import {codeCall} from "@/lib/codeCallWrapper.js"; 

codeCall();
will the codeCall function be the equivalent of inline code if I don't 'use server' or 'use client' in the codeCallWrapper.js file?

3 Replies

Laysan Albatross
If you don't use 'use client' it gets Server-Side-Rendered automatically in most cases.
DutchOP
thanks