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

Did not get propTypes #33

Open
simonguo opened this issue Jan 24, 2018 · 3 comments
Open

Did not get propTypes #33

simonguo opened this issue Jan 24, 2018 · 3 comments

Comments

@simonguo
Copy link

in

import PropTypes from 'prop-types';
import React from 'react';

const propTypes={
  children: PropTypes.node,
  className: PropTypes.string
}

function Example() {
  return <div />;
}

Example.propTypes = propTypes;

export default Example;

out

import PropTypes from 'prop-types';
import React from 'react';

const propTypes = {
  children: PropTypes.node,
  className: PropTypes.string
};

function Example() {
  return <div />;
}

Example.handledProps = [];
Example.propTypes = propTypes;

export default Example;
@layershifter
Copy link
Owner

It will be awesome to get PR that adds this functionality 👍 BTW, there is an easier way to get bindings 😸

@simonguo
Copy link
Author

simonguo commented Feb 3, 2018

@layershifter Thank you so much, I will take a closer look at the babel Document!

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

No branches or pull requests

2 participants