[Typescript] Custom Elements in React
typescriptReact in Elements Custom
2023-09-14 08:59:11 时间
import React from 'react';
declare global {
namespace JSX {
interface IntrinsicElements {
'custom-element': {
children?: React.ReactNode;
title?: string
};
}
}
}
const element = <custom-element title="abc">hello world</custom-element>;
相关文章
- vue typescript .eslintrc.js
- [Typescript] Defining exclusive properties with TypeScript
- [Typescript] @typescript-eslint/unbound-method
- [Typescript] Making TypeScript Stick - 5 - Extends
- [React Typescript 2022] Type a Radio Button Component in React using TypeScript
- [Typescript] Narrow the unknown Type with TypeScript's Assertion Functions
- [Typescript] Use the Nullish Coalescing Operator in TypeScript (isNil)
- [React] Ensure all React useEffect Effects Run Synchronously in Tests with react-testing-library
- [Typescript] Specify Exact Values with TypeScript’s Literal Types
- [Typescript Kaop-ts] Use AOP in Vue Components with TypeScript and Kaop-ts
- [React Intl] Render Content with Markup Using react-intl FormattedHTMLMessage
- [React Typescript] Discriminated unions in components props
- [Typescript] Function scope in typescript
- [Typescript + React] Tip: Use generics in React to make dynamic and flexible components
- [Typescript] Dynamic types: Use TypeScript's Mapped Types and Template Literal Types Together
- [Typescript] Create Type From Any Given Data in TypeScript
- [Typescript] Ignore Null or Undefined Values with TypeScript Non-Null Assertion Operator
- [React] Write a stateful Component with the React useState Hook and TypeScript
- [React] Ensure all React useEffect Effects Run Synchronously in Tests with react-testing-library
- [Typescript] Improve Readability with TypeScript Numeric Separators when working with Large Numbers
- [Webpack + React] Import CSS Modules with TypeScript and webpack
- [React Intl] Install and Configure the Entry Point of react-intl
- [TypeScript] Function Overloads in Typescript
- React的source code init时会自动检测Chrome dev tool的react extension装了没
- QCRTGraph for JavaScript/TypeScript Crack