Files
Signal-Desktop/js/react/sub/test2.tsx
Scott Nonnenberg 893fb1cb9e Introduce React/TypeScript/TSLint into app for new UI components
npm run transpile
  Works on files under js/react/
  Outputs files right next to the .tsx file

This is part of our `grunt dev` task, as well as the default grunt task,
which does everything else necessary to get a raw git checkout ready to
run.
2018-04-04 16:08:27 -07:00

39 lines
584 B
TypeScript

import React from 'react';
interface IProps { name: string; }
interface IState { count: number; }
const items = [
'one',
'two',
'three',
'four',
];
export class InlineReply extends React.Component<IProps, IState> {
constructor(props: IProps) {
super(props);
this.state = {
count: 0,
};
}
public render() {
const { name } = this.props;
return (
<div>
This is a basic component. Hi there, {name}!
</div>
);
}
}
export function greeter2(person: any) {
// console.log(items);
return `Hello, ${person}`;
}