interface ISettings {
        duration: number
        smart: boolean
        width: WidthProperty<string | number>
        height: HeightProperty<string | number>
      }
      const initialSettings: ISettings = {
        duration: 500,
        smart: true,
        width: '100%',
        height: '100%',
      }
      const [settings, setSettings] = React.useState<ISettings>(initialSettings)
      
      Typescript language logo

      React useState

      Codiga's TypeScript Recipes

      return a state array with two values using useState hook

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.