├── index.html
├── style.scss
├── index.tsx
├── src
└── app.tsx
├── README.md
└── package.json
/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/style.scss:
--------------------------------------------------------------------------------
1 | h1, p {
2 | font-family: Lato;
3 | }
--------------------------------------------------------------------------------
/index.tsx:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { render } from 'react-dom';
3 | import './style.scss';
4 | import App from './src/app';
5 |
6 | render(, document.getElementById('root'));
7 |
--------------------------------------------------------------------------------
/src/app.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | function App() {
4 | const names = ['Panth', 'Akshay', 'Patel'];
5 |
6 | return (
7 |
8 | {names.map(o => {
9 | return
Name: {o}
;
10 | })}
11 |
12 | );
13 | }
14 |
15 | export default App;
16 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # react-ts-forloop
2 |
3 | ```js
4 | import React from 'react';
5 |
6 | function App() {
7 | const names = ['Panth', 'Akshay', 'Patel'];
8 |
9 | return (
10 |
11 | {names.map(o => {
12 | return
Name: {o}
;
13 | })}
14 |
15 | );
16 | }
17 |
18 | export default App;
19 |
20 | ```
21 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-ts",
3 | "version": "0.0.0",
4 | "private": true,
5 | "dependencies": {
6 | "@popperjs/core": "^2.9.2",
7 | "@types/react": "^17.0.14",
8 | "@types/react-dom": "^17.0.9",
9 | "bootstrap": "^5.0.2",
10 | "node-sass": "^6.0.1",
11 | "react": "^17.0.2",
12 | "react-bootstrap": "^1.6.1",
13 | "react-dom": "^17.0.2"
14 | },
15 | "scripts": {
16 | "start": "react-scripts-ts start",
17 | "build": "react-scripts-ts build",
18 | "test": "react-scripts-ts test --env=jsdom",
19 | "eject": "react-scripts-ts eject"
20 | },
21 | "devDependencies": {
22 | "react-scripts-ts": "latest"
23 | }
24 | }
--------------------------------------------------------------------------------