dhpk-react-18-notes

dhpk-react-18-notes is a skill for Claude Code from hmj1026/dhpk. It costs 109 tokens per session (1,469 once invoked), scanned A, original, MIT.

A reference for building and upgrading applications with React 18, a JavaScript user-interface library. It explains the React 18 root setup, server-side page hydration, concurrent rendering, and related behavior changes.

In plain words
What is it for?
Use it when configuring React 18, changing `createRoot` or `hydrateRoot`, working with Strict Mode, or planning a React version upgrade.
Why use it?
It helps avoid mixing React 18 guidance with older React setup or later-version instructions. It also clarifies which changes are needed when moving from React 17 or toward React 19.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the dhpk plugin — 65 skills, 31 commands, 37 agents, 4 hooks shipped together

Good fit Use it when configuring React 18, changing createRoot or hydrateRoot, working with Strict Mode, or planning a React version upgrade.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hmj1026/dhpk/dhpk-react-18-notes
View source ↗ hmj1026/dhpk
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add hmj1026/dhpk --skill dhpk-react-18-notes
Clone the repo
git clone --depth 1 https://github.com/hmj1026/dhpk

Made for: Claude Code.

Or install dhpk, the plugin that ships this one along with the rest of its 65 skills, 31 commands, 37 agents, 4 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dhpk-react-18-notes

README.md
[![agentmods](https://agentmods.dev/badge/skills/hmj1026/dhpk/dhpk-react-18-notes/github.svg)](https://agentmods.dev/skills/hmj1026/dhpk/dhpk-react-18-notes)
Your own site
<a href="https://agentmods.dev/skills/hmj1026/dhpk/dhpk-react-18-notes"><img src="https://agentmods.dev/badge/skills/hmj1026/dhpk/dhpk-react-18-notes/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for dhpk-react-18-notes

Your own site · 80×15
<a href="https://agentmods.dev/skills/hmj1026/dhpk/dhpk-react-18-notes"><img src="https://agentmods.dev/badge/skills/hmj1026/dhpk/dhpk-react-18-notes.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 109 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,469 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00109 $0.01469
Opus 5 $0.00055 $0.00734
Sonnet 5 $0.00022 $0.00294
Haiku 4.5 $0.00011 $0.00147

Measured 4d ago against content hash aca40f195d13, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

dhpk-react-18-notes scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

generated/claude-profiles/compat-v1/package/skills/dhpk-react-18-notes/SKILL.md · 167 lines

How it starts

The opening of the file, as written. The whole thing — 167 lines — stays where its author put it; the contents beside it link to each section on GitHub.

React 18 — concurrent-rendering baseline

React 18 (March 2022) shipped the concurrent renderer. Its features are opt-in per update, unlocked by adopting the new createRoot API.

Family routing and the React/Next compatibility matrix live in docs/agent-guidance/frontend-framework-routing.md. This module owns standalone React 18 language guidance after the family is selected.


Signature features

createRoot / hydrateRoot (react-dom/client)

The new root API replaces ReactDOM.render and is what turns on all React 18 features. ReactDOM.render still works but warns and runs in a legacy (non-concurrent) mode.

// Before (React 17)
import { render } from 'react-dom'
render(<App />, document.getElementById('root'))

// React 18
import { createRoot } from 'react-dom/client'
const root = createRoot(document.getElementById('root'))
root.render(<App />)

SSR hydration moves from ReactDOM.hydrate to hydrateRoot.

Automatic batching

All state updates are now batched — including those inside promises, setTimeout, and native event handlers, not just React event handlers. Force a synchronous flush with flushSync when a DOM read must happen between updates.

setTimeout(() => {
  setCount(c => c + 1)
  setFlag(f => !f)
  // React 18: one re-render (batched); React 17: two re-renders
}, 1000)

Concurrent features (opt-in)

Enabled per update, not globally:

  • startTransition / useTransition — mark non-urgent updates so urgent ones (typing) stay responsive.
  • useDeferredValue — defer re-rendering a value under load.
import { startTransition } from 'react'
setInputValue(input)              // urgent
startTransition(() => {
  setSearchQuery(input)           // non-urgent transition
})

Streaming SSR + selective hydration

renderToPipeableStream (Node) / renderToReadableStream (web/edge) replace renderToString for streaming; <Suspense> boundaries stream and hydrate selectively.

New hooks

Read the full file on GitHub · 167 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 167 lines · 109 tokens per session scan A aca40f195d13

Subscribe to this mod's changes

dhpk-react-18-notes is a skill published in the GitHub repository hmj1026/dhpk (2 stars, last pushed today), licensed MIT. It adds 109 tokens to every session and 1,469 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

Other skills, from other repositories

create-site

Creates a new Power Pages code site (SPA) using React, Angular, Vue, or Astro. Guides through the full process from initial concept to deployed site: requirements discovery, scaffolding, component planning, design, implementation, validation, and deployment. Use when the user wants to create, build, or scaffold a new…

microsoft/power-platform-skills · 73 tokens

genpage

Creates, updates, and deploys Power Apps generative pages for model-driven apps using React v17, TypeScript, and Fluent UI V9. Orchestrates specialist agents for planning, entity creation, and code generation. Use it when user asks to build, retrieve, or update a page in an existing Microsoft Power Apps model-driven…

microsoft/power-platform-skills · 140 tokens

create-code-app

Creates Power Apps code apps using React and Vite. Use when building code apps, scaffolding projects, or deploying to Power Platform.

microsoft/power-platform-skills · 31 tokens

cloudflare-nextjs

Deploy Next.js to Cloudflare Workers via the OpenNext adapter (@opennextjs/cloudflare). Use for SSR/ISR/SSG/App or Pages Router, getCloudflareContext, bindings (D1/R2/KV/AI/Hyperdrive), caching tiers, skew protection, multi-worker, custom worker, env vars, or worker…

secondsky/claude-skills · 89 tokens

auto-animate

AutoAnimate (@formkit/auto-animate) zero-config animations for React. Use for list transitions, accordions, toasts, or encountering SSR errors, animation libraries complexity.

secondsky/claude-skills · 40 tokens

bun-nextjs

This skill should be used when the user asks about "Next.js with Bun", "Bun and Next", "running Next.js on Bun", "Next.js development with Bun", "create-next-app with Bun", or building Next.js applications using Bun as the runtime.

secondsky/claude-skills · 58 tokens