Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating to use Stateless Component and PropTypes pkg (fixes #55) #56

Closed
wants to merge 1 commit into from
Closed

Updating to use Stateless Component and PropTypes pkg (fixes #55) #56

wants to merge 1 commit into from

Conversation

abritinthebay
Copy link

@abritinthebay abritinthebay commented Apr 14, 2017

fixes #55

Copy link

@fitiskin fitiskin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also update

export const CopyToClipboard = React.createClass({
  //
});

to

import createReactClass from 'create-react-class'

export const CopyToClipboard = createReactClass({
 //
});

Copy link
Owner

@nkbt nkbt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To many unrelated changes


return React.cloneElement(elem, {
...sanitizedProps,
onClick: event => onClick(event, props)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not create new function on each render. Please, revert this PR to only change create class and prop types. This PR does too much.

@nkbt
Copy link
Owner

nkbt commented Apr 20, 2017

Fixed by #58

@nkbt nkbt closed this Apr 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generates a warning about using deprecated feature in React.
3 participants