Skip to content

directives use-client use-server #635

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/content/reference/rsc/directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ title: Direktifler

<RSC>

<<<<<<< HEAD
Direktifler, [React Sunucu Bileşenleri](/learn/start-a-new-react-project#bleeding-edge-react-frameworks) içinde kullanılmak içindir.
=======
Directives are for use in [React Server Components](/reference/rsc/server-components).
>>>>>>> a3e9466dfeea700696211533a3570bc48d7bc3d3

</RSC>

Expand Down
4 changes: 0 additions & 4 deletions src/content/reference/rsc/use-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ titleForTitleTag: "'use client' directive"

<RSC>

<<<<<<< HEAD
`'use client'`, [React Sunucu Bileşenleri](/learn/start-a-new-react-project#bleeding-edge-react-frameworks) ile kullanmak içindir.
=======
`'use client'` is for use with [React Server Components](/reference/rsc/server-components).
>>>>>>> a3e9466dfeea700696211533a3570bc48d7bc3d3

</RSC>

Expand Down
4 changes: 0 additions & 4 deletions src/content/reference/rsc/use-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ titleForTitleTag: "'use server' direktif"

<RSC>

<<<<<<< HEAD
`'use server'`, [React Sunucu Bileşenleri kullanımı için](/learn/start-a-new-react-project#bleeding-edge-react-frameworks) kullanılır.
=======
`'use server'` is for use with [using React Server Components](/reference/rsc/server-components).
>>>>>>> a3e9466dfeea700696211533a3570bc48d7bc3d3

</RSC>

Expand Down
32 changes: 10 additions & 22 deletions src/pages/[[...markdownPath]].js
Original file line number Diff line number Diff line change
Expand Up @@ -109,30 +109,18 @@ export async function getStaticProps(context) {
try {
mdx = fs.readFileSync(rootDir + path + '.md', 'utf8');
} catch {
try {
mdx = fs.readFileSync(rootDir + path + '/index.md', 'utf8');
} catch {
return {
notFound: true,
};
}
mdx = fs.readFileSync(rootDir + path + '/index.md', 'utf8');
}

try {
const {toc, content, meta, languages} = await compileMDX(mdx, path, {});
return {
props: {
toc,
content,
meta,
languages,
},
};
} catch (error) {
return {
notFound: true,
};
}
const {toc, content, meta, languages} = await compileMDX(mdx, path, {});
return {
props: {
toc,
content,
meta,
languages,
},
};
}

// Collect all MDX files for static generation.
Expand Down