Sign in Get 3 free credits

Try a job or a niche: tiktok captions, study notes, excel formulas. Press Esc to close.

Scroll Menu Testing and SSR

Gets react-horizontal-scrolling-menu working in Next.js and tested in Jest and Playwright without flicker.

Claude's review

7/10 Specific SSR and testing recipe for the menu library: use client, defaultValue for first paint, Jest CJS mapping, IntersectionObserver mock and polling Playwright asserts.

We asked Claude the question you would ask: would I be glad I installed this? We only sell skills it rates 7 or higher.

In detail

Server rendering and testing for react-horizontal-scrolling-menu: the library is client-only ('use client' required in React Server Components, else "createContext is not a function"), SSR first paint is controlled by the useIsVisible defaultValue argument (canonical ('first', true) / ('last', false)), transpilePackages for older Next.js, Jest moduleNameMapper to dist/index.cjs for "Cannot use import statement outside a module" plus an IntersectionObserver class mock for jsdom (ReferenceError on mount without it), and async poll-based assertions (Playwright preferred). Load when integrating with Next.js / TanStack Start, fixing hydration flicker, or writing tests for the menu.

How you use it

  1. Add it to your pack, then download your pack (1 credit).
  2. In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
  3. Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide

Safety check

Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.

An automated scan lowers risk but cannot promise zero risk. How we check skills

Preview

The first lines of SKILL.md
---
name: 'menu-testing-ssr'
description: >
  Server rendering and testing for react-horizontal-scrolling-menu: the
  library is client-only ('use client' required in React Server Components,
  else "createContext is not a function"), SSR first paint is controlled by
  the useIsVisible defaultValue argument (canonical ('first', true) /
  ('last', false)), transpilePackages for older Next.js, Jest
  moduleNameMapper to dist/index.cjs for "Cannot use import statement
  outside a module" plus an IntersectionObserver class mock for jsdom
  (ReferenceError on mount without it), and async poll-based assertions
  (Playwright preferred). Load when integrating with Next.js / TanStack
  Start, fixing hydration flicker, or writing tests for the menu.
metadata:
  type: core
  library: 'react-horizontal-scrolling-menu'
  library_version: '8.3.2'
sources:
  - 'asmyshlyaev177/react-horizontal-scrolling-menu:README.md'
  - 'asmyshlyaev177/react-horizontal-scrolling-menu:example-nextjs/app/page.tsx'
  - 'asmyshlyaev177/react-horizontal-scrolling-menu:example-tanstack/src/routes/index.tsx'
  - 'asmyshlyaev177/react-horizontal-scrolling-menu:e2e/scrolling-menu.spec.ts'
  - 'asmyshlyaev177/react-horizontal-scrolling-menu:stories/test.tsx'
---

# Testing and SSR

The library is SSR-safe but client-only: the first render emits plain
markup and IntersectionObserver attaches client-side. What the server
paints is whatever `useIsVisible`'s `defaultValue` argument says; real
visibility exists only after the observer fires in the browser. Every
integration and testing decision below follows from that.

## Setup

An SSR-safe menu page for Next.js App Router. The `data-cy` /
`data-visible` attributes double as the test contract used by the
Playwright patterns below.

```tsx
...

From asmyshlyaev177's repository, MIT licence.

Related skills

  • Checked

    TinyBase app builder

    Scaffolds and extends local first JavaScript apps with TinyBase, including schemas, persistence and sync.

    by tinyplex 5.2k
    7/101 credit
  • Checked

    ComfyUI custom node UI

    Adds widgets, sidebar tabs, commands and dialogs to ComfyUI custom nodes, so your node feels built in.

    by jtydhr88 325
    8/101 credit
  • Checked

    Scrolling menu upgrade

    Finds outdated react-horizontal-scrolling-menu code and rewrites it for version 8 so the menu works again.

    by asmyshlyaev177 789
    7/101 credit
  • Checked

    Screenshot to React code

    Rebuilds a screenshot or mockup as React, TypeScript and Tailwind code that closely matches the design.

    by buildfastwithai 792
    7/101 credit
  • Checked

    Map location picker

    Adds a map pin picker to a web form, so users can choose and submit one exact spot like a delivery address.

    by cyphercodes 84
    7/101 credit
  • Checked

    Port code to Rust

    Ports C, C++, Python, Go or JavaScript code into idiomatic Rust, with tests that prove it behaves the same.

    by morganlinton 2.2k
    9/101 credit

Secure checkout

Credits

AUD

  1. 1Choose
  2. 2Pay on Square
  3. 3Credits added