mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 11:17:49 +01:00
Add React and TS to webpacker; add react-rails gem
This commit is contained in:
19
app/javascript/components/Hello.tsx
Normal file
19
app/javascript/components/Hello.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import * as React from "react";
|
||||
|
||||
interface IProps {
|
||||
name: string;
|
||||
}
|
||||
|
||||
class Hello extends React.Component<IProps> {
|
||||
render () {
|
||||
const {name} = this.props;
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<span>Hello {name}!</span>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Hello;
|
||||
Reference in New Issue
Block a user