Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
T

typed-react

> 编程语言
Open source

A binding layer between React and TypeScript

369 stars0 likes1 views
WebsiteGitHub

About

A binding layer between React and TypeScript

Typed React

NPM Version Build Status Coverage

A binding layer between React and TypeScript for the React.createClass syntax. With React 0.13, you can use ES6 classes to inherit from React components. This works well with TypeScript and you can just use the type definitions in DefinitelyTyped. The inheritance path has some different functionality so you may still want to use the React.createClass pattern. TypedReact can help you implement that pattern by providing a dummy parent class and a set of functions to appropriately extract the prototype for React.createClass

Installation

bash
npm install typed-react --save

Example

…

In this case we export the Props and the Factory but we could make the props and state inline interfaces and just export the factory function.

Mixins

TypedReact supports using existing React Mixins as well as defining new mixins with idiomatic TypeScript. The example is based on http://www.typescriptlang.org/Handbook#mixins. You need to use createMixin on your own mixins and should export that from your mixin modules.

…

Changelog

  • 3.3 Updating the React type definitions and moving the location of the type definition
  • 3.2 Update with new react.d.ts typings
  • 3.1 extractPrototype is now createMixin
  • 3.0 Idiomatic Mixin Support
  • 2.2 Making React a peer dependency. This means you do not need to pass React.createClass into createClass.
  • 2.1 Switching to createClass
  • 2.0 React 0.12.RC
  • 1.4 Removed incorrect mixin support
  • 1.3 Mixins

Development Setup

bash
git clone [email protected]:Asana/typed-react.git
cd typed-react
npm install
npm run typings
npm test

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言