Skip to content

Commit e4ec21b

Browse files
committed
refactor: change App component to TSX
and apply `AppProps` interface
1 parent 87d43f9 commit e4ec21b

File tree

3 files changed

+22
-14
lines changed

3 files changed

+22
-14
lines changed

src/App.jsx

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/App.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React, { PureComponent } from 'react'
2+
3+
import JsTestComponent from 'components/JsTestComponent/JsTestComponent.jsx'
4+
import TsTestComponent from 'components/TsTestComponent/TsTestComponent'
5+
6+
interface AppProps {
7+
param1?: string
8+
}
9+
10+
class App extends PureComponent {
11+
render(props: AppProps): string {
12+
return (
13+
<>
14+
<h1 id="app_headline">@stackr23/webpack up and running!</h1>
15+
<JsTestComponent /* testParam="teststring" */ />
16+
</>
17+
)
18+
}
19+
}
20+
export default App
21+

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import React from 'react'
33
import ReactDOM from 'react-dom'
44

5-
import App from './App.jsx'
5+
import App from './App'
66

77

88
const rootElement = document.getElementById('app-root') || document.getElementById('app')

0 commit comments

Comments
 (0)