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

Add react-component blueprint #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

blia
Copy link

@blia blia commented Jun 3, 2016

Hello!

I am just add a react-component blueprint for ember generator, for self usage, but you can merge this PR for all :)

Usage:
ember generate react-component <component-name> [options]

Blueprint has 3 different templates:

  • Class component(Default)
  • Function component
  • Block-less function component
import React from 'npm:react';

class xButton extends React.Component {
    render() {
        return (
            <div></div>
        );
    }
};

xButton.propTypes = {

};

export default xButton;
import React from 'npm:react';

const xButton = props => {

    return (
        <div></div>
    );
};

xButton.propTypes = {

};

export default xButton;
import React from 'npm:react';

const xButton = props => 
    (
        <div></div>
    );

xButton.propTypes = {

};

export default xButton;

@alexgb
Copy link
Contributor

alexgb commented Jul 22, 2016

@blia sorry, missed this PR for some reason. I'm getting an error when bringing up the generator. Maybe a missing dependency?

Error: Cannot find module 'ember-cli-string-utils' from ember-cli-react/blueprints/react-component/index.js:3:26

@alexgb alexgb self-assigned this Jul 22, 2016
@alexgb alexgb removed their assignment Jul 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants