What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2021-11-01 17:21:18
how to use class component in typescript react
import * as React from 'react'; export interface TestProps { count: number; } export interface TestState { count: number; } class Test extends React.Component<TestProps, TestState> { state = { count:0 } render() { retu... Add solution -
TypeScript 2021-10-22 07:59:04
state in react typescript
interface IProps { } interface IState { playOrPause?: string; } class Player extends React.Component<IProps, IState> { // ------------------------------------------^ constructor(props: IProps) { super(props); this.state = { pl... Add solution -
TypeScript 2021-09-15 18:29:02
typescript types for state
interface IProps { } interface IState { playOrPause?: string; } class Player extends React.Component<IProps, IState> { // ------------------------------------------^ constructor(props: IProps) { super(props); this.state = { pl... Add solution -
Javascript 2021-09-08 16:15:02
open modal on clicking select option in react
import * as React from 'react'; export class Demo extends React.Component<{}, {}> { state = { options: [ { text: 'doNothing', value: 'doNothing' }, { text: 'openModal', value: 'openModal' } ], open: false }; onClose =... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5