Skip to content

Commit

Permalink
Create index.md (#796)
Browse files Browse the repository at this point in the history
Add missing `extends Component` to Card class definition
  • Loading branch information
SalimBensiali authored and darthtrevino committed Jun 15, 2017
1 parent 4004f7a commit ac0da13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ module.exports = DragSource(ItemTypes.CARD, cardSource, collect)(Card);
```js
// Let's make <Card text='Write the docs' /> draggable!

import React from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { DragSource } from 'react-dnd';
import { ItemTypes } from './Constants';
Expand Down Expand Up @@ -105,7 +105,7 @@ const propTypes = {
connectDragSource: PropTypes.func.isRequired
};

class Card {
class Card extends Component {
render() {
const { isDragging, connectDragSource, text } = this.props;
return connectDragSource(
Expand Down

0 comments on commit ac0da13

Please sign in to comment.