What's New in Preact for 2026?
If you’re evaluating Preact for a production project in 2026, the landscape has shifted. Between a critical security patch, the Preact 11 beta, and significant ecosystem changes, there’s practical information you need before making decisions.
Key Takeaways
- Apply the January 2026 security patch immediately to all Preact 10.x projects to prevent unsafe VNode injection and potential XSS issues.
- Preact 11 beta introduces Hydration 2.0 and
Object.isfor hook dependencies, but isn’t production-ready yet. - Use Vite instead of preact-cli for new projects, and choose preact-iso over preact-router for routing.
- The
preact/compatlayer works for most React libraries but does not yet support React 19 features like theuse()hook.
The January 2026 Security Patch
In January 2026, Preact released a security fix addressing a VNode constructor strict-equality vulnerability (patched in the 10.26.10 / 10.27.3 / 10.28.2 releases on GitHub). This change ensures that only real VNode instances created by Preact are accepted internally.
Previously, specially crafted plain objects (for example from JSON input) could be mistaken for VNodes, potentially enabling unsafe DOM injection and XSS-style attack vectors in edge cases. If you’re running Preact 10.x, update immediately—the fix is backward compatible and requires no code changes.
Preact 11 Beta: What’s Actually Changing
The Preact 11 beta introduces meaningful updates, though it’s not yet stable. Don’t plan production migrations around it until a final release ships.
Hydration 2.0
The most significant change is Hydration 2.0. Previously, components suspending during hydration had to return exactly one DOM node. Preact 11 removes this restriction—components can now return zero or multiple nodes:
function LazyAnalytics() {
// Valid in Preact 11: returns null
return null
}
function MultipleElements() {
// Valid in Preact 11: returns fragment with multiple children
return (
<>
<p>First</p>
<p>Second</p>
</>
)
}
This enables more flexible SSR patterns and simplifies component design for async boundaries.
Hook Dependency Equality
Preact 11 switches hook dependency checks from loose equality to Object.is. This fixes edge cases with NaN comparisons in useEffect, useMemo, and useCallback. If you’ve worked around NaN handling before, those workarounds become unnecessary.
Ref Handling Improvements
Preact 11 improves how refs are handled for function components, reducing the need for explicit forwardRef in many scenarios and aligning more closely with modern React behavior. The exact API surface is still evolving in the beta, so library authors should treat this as provisional until the stable release.
Breaking Changes to Note
- Legacy browser support (including IE11) is fully dropped.
- Some legacy behaviors such as
defaultPropshandling and automaticpxsuffixing are now confined topreact/compat.
Discover how at OpenReplay.com.
Preact Tooling 2026: Ecosystem Shifts
The tooling story has changed substantially. Understanding these shifts prevents you from building on deprecated foundations.
Vite Replaces preact-cli
preact-cli is no longer the recommended scaffolding tool and is largely unmaintained. New projects should use Vite with the Preact preset. Vite offers faster builds, better HMR, and active maintenance.
preact-iso Over preact-router
preact-router has stagnated. For new applications, preact-iso is the recommended routing solution. It’s lighter, actively maintained, and designed for modern Preact patterns.
Signals: Optional State Management
Preact Signals provides reactive state management as a first-party library. It’s not part of core Preact—you opt in explicitly. Signals work well for fine-grained reactivity but aren’t required for typical applications.
Preact vs React Compatibility in 2026
The preact/compat layer provides good coverage for running React libraries, but gaps remain. React 19 features like the use() hook are not yet supported. If your project depends on cutting-edge React APIs, verify compatibility before committing.
For most React libraries—routing, state management, UI components—preact/compat works reliably. The Preact 11 beta improves this further by tightening behavioral compatibility in areas such as ref handling.
When Preact Makes Sense
Preact remains compelling for bundle-size-constrained environments. Shopify’s 2025-10 API update mandates Preact for UI extensions with a strict 64 KB limit. Similar constraints exist in embedded widgets, PWAs, and performance-critical landing pages.
If bundle size isn’t a primary concern and you need full React 19 compatibility, React itself may be simpler.
Practical Recommendations
For Preact 2026 updates, here’s what to do now:
- Apply the January 2026 security patch to all Preact 10.x projects
- Use Vite for new project scaffolding
- Choose preact-iso for routing in new applications
- Wait on Preact 11 for production—monitor the beta but don’t migrate yet
- Test
preact/compatagainst your specific React dependencies before committing
Conclusion
Preact remains a solid choice for size-sensitive production work. The ecosystem is maturing with clearer tooling recommendations and improved React compatibility. Apply the security patch immediately, adopt Vite and preact-iso for new projects, and monitor the Preact 11 beta without rushing to migrate. With current information, you can avoid deprecated tooling and understand real compatibility boundaries.
FAQs
Yes, you can migrate existing preact-cli projects to Vite. Create a new Vite project with the Preact preset, copy your source files, and update your build scripts. Most configurations translate directly, though you may need to adjust path aliases and environment variable handling to match Vite's conventions.
No, Preact Signals is entirely optional. You can continue using useState, useReducer, or external state management libraries like Zustand or Redux. Signals offer fine-grained reactivity benefits but add complexity. Evaluate whether your application needs that level of optimization before adopting them.
Test the library in a development environment before committing. Install the library, configure your bundler to alias react to preact/compat, and verify core functionality works. Check the library's GitHub issues for known Preact compatibility problems. Libraries using React 19-specific APIs like use() won't work.
Start new projects with Preact 10.x and the January 2026 security patch. The Preact 11 beta isn't production-ready, and migration from 10.x to 11 should be straightforward once stable. Building on proven tooling now avoids delays while still positioning you for an easy upgrade later.
Gain Debugging Superpowers
Unleash the power of session replay to reproduce bugs, track slowdowns and uncover frustrations in your app. Get complete visibility into your frontend with OpenReplay — the most advanced open-source session replay tool for developers. Check our GitHub repo and join the thousands of developers in our community.