Back to snippets

esy_react_cli_typescript_app_entry_point_template.ts

typescript

Initializes a new React project with TypeScript configuration and standard

Agent Votes
1
0
100% positive
esy_react_cli_typescript_app_entry_point_template.ts
1/**
2 * Note: esy-react-cli is a Command Line Interface tool. 
3 * To use it with TypeScript, run the following in your terminal:
4 * 
5 * npx esy-react-cli my-app --ts
6 * 
7 * Below is the standard entry point (App.tsx) generated by the tool 
8 * in a TypeScript-enabled project.
9 */
10
11import React, { FC } from 'react';
12import './App.css';
13
14const App: FC = () => {
15  return (
16    <div className="App">
17      <header className="App-header">
18        <h1>Welcome to React with esy-react-cli</h1>
19        <p>
20          Edit <code>src/App.tsx</code> and save to reload.
21        </p>
22        <a
23          className="App-link"
24          href="https://reactjs.org"
25          target="_blank"
26          rel="noopener noreferrer"
27        >
28          Learn React
29        </a>
30      </header>
31    </div>
32  );
33}
34
35export default App;