CodeForAfrica / CodeForAfrica/ui

Using `commons-ui` in server rendered components does not work.

Open
#878 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3
Forks
2
Avg merge
3d 1h
Merged PRs (30d)
5

Description

**Describe the bug**
Using any `@commons-ui` component in a server-rendered page or component does not work. It throws an error about client-side-only components being used in the server. Components that can be server-rendered do not work as expected.

**To Reproduce**

1. In any of the pages that are server-rendered, try using any component from `commons-ui/core`.

**Expected behaviour**
Components without explicit client-side dependencies should work with server-side rendering.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue by using a component from commons-ui/core in a server-rendered page or component. Start by tracing the server-rendering and client-only component boundary involved in that usage. Done means components without explicit client-side dependencies render correctly in server-rendered pages without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nextjs, react
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.