// Class Component React TypeScript ( with props and state usage ):

import React, { Component } from 'react';

type Props = { head ?: string , age ?: number };

type State = { num: number  };

type DefaultProps = { head : string, age : string }
/* <Props, State, DefaultProps> tell that 
these initialised types will be used in the class. */
class Counter extends Component <Props, State, DefaultProps> {

/* Default props appear when no value for the prop 
is present when component is being called */

    
    static defaultProps : DefaultProps  = {
        head: "Heading is Missing",
        age: "Age is missing",
    };
// Always write state above the render() method.
    state: State = {
        num: 0,
    };

    render() {
  
        const add = () => this.setState({ num: this.state.num + 1 }) ;
        
        return (
            <div>
                <h1> { this.props.head } </h1>
                <p> Age: { this.props.age } </p> <br />
                <h3> { this.state.num } </h3>
                <button onClick={add}>Add 1</button>
            </div>
        );
    }
}

export default Counter;
// Complete guide to react redux typescript

// https://github.com/piotrwitek/react-redux-typescript-guide
react redux typescript
content_copy
// For .ts (not .tsx)
const func = <T>() => { 
}

// For react Typescript (.tsx)
const func = <T,>() => {
}

// For older versions of react typescript
const func = <T extends unknown>() => {
  
}
// React typescript PWA
npx create-react-app my-app --template cra-template-pwa-typescript
react typescript pwa
content_copy
let element: JSX.Element;
let element: TSX.Element;
import React from 'react';

interface Props {
}

const App: React.FC<Props> = (props) => {
  return (
    <div><div/>
  );
};

export default App;
npx react-native init MyApp --template react-native-template-typescript
npx create-react-app my-app --template typescript
npx react typescript
content_copy
npx create-react-app my-app --template typescript

# or
yarn create react-app my-app --template typescript
Yes, with python, you can web development :)
  
I recommend the django framework: https://www.djangoproject.com/
and Flask: https://flask.palletsprojects.com/

If you want to read more, I can recommend you this article:
https://www.imaginarycloud.com/blog/why-use-python-for-web-development/