init
This commit is contained in:
25
app/components/price-list.tsx
Normal file
25
app/components/price-list.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import React from 'react';
|
||||
import { PriceListItem } from './price-list-item/price-list-item';
|
||||
|
||||
interface IProps {
|
||||
data: any[];
|
||||
}
|
||||
|
||||
export class PriceList extends React.Component<IProps, any> {
|
||||
constructor(props: IProps) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
// componentDidMount() {
|
||||
// console.log(this.props.data);
|
||||
// }
|
||||
|
||||
// componentWillReceiveProps(nextProps: IProps) {
|
||||
// if (this.props !== nextProps) {
|
||||
// // do stuff
|
||||
// console.log(nextProps);
|
||||
// }
|
||||
// }
|
||||
|
||||
render = () => this.props.data.map((value, index) => <PriceListItem data={value} key={index} />);
|
||||
}
|
||||
Reference in New Issue
Block a user