Skip to content

fix(config): remove "use client" directive to fix ui-core build#192

Merged
halvaradop merged 1 commit intomasterfrom
fix/use-client-directive
Jun 30, 2025
Merged

fix(config): remove "use client" directive to fix ui-core build#192
halvaradop merged 1 commit intomasterfrom
fix/use-client-directive

Conversation

@halvaradop
Copy link
Owner

@halvaradop halvaradop commented Jun 30, 2025

Description

This pull request removes the "use client" directive from the @halvaradop/ui-core package. Including this directive at the top level of the package was causing rendering issues in applications using Server Components—particularly in Next.js—because it forces the file to be treated as a Client Component, preventing its usage in server-rendered environments.

This issue was identified while integrating the library into a Next.js project, which distinguishes between client and server components using "use client" and "use server" directives.

By removing the directive, we restore compatibility with server-side rendering (SSR) and allow developers to apply "use client" only where needed in their own application code.

Checklist

  • Added documentation.
  • The changes do not generate any warnings.
  • I have performed a self-review of my own code.
  • All tests have been added and pass successfully.

Notes

@github-project-automation github-project-automation bot moved this to Backlog in @halvaradop Jun 30, 2025
@halvaradop halvaradop merged commit ec636b9 into master Jun 30, 2025
4 checks passed
@halvaradop halvaradop deleted the fix/use-client-directive branch June 30, 2025 21:59
@github-project-automation github-project-automation bot moved this from Backlog to Done in @halvaradop Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant