Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class NumbersGame extends React.Component<any, INumbersGameState>{
- public constructor(props: any) {
- super(props);
- this.onDragEnd = this.onDragEnd.bind(this);
- this.state = {...initialData};
- }
- public onDragEnd(result: any) {
- // the item was dropped!
- }
- public render() {
- const numbers = this.state.column.numberIds.map((numberId: string) => this.state.numbers[numberId]);
- return (
- <NumbersGameContext onDragEnd={this.onDragEnd}>
- <VerticalColumn column={this.state.column} items={numbers} />
- </NumbersGameContext>
- )
- }
- }
Add Comment
Please, Sign In to add comment