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

vue-class-component support #17

Open
sobolevn opened this issue Jun 18, 2018 · 4 comments
Open

vue-class-component support #17

sobolevn opened this issue Jun 18, 2018 · 4 comments
Labels
Hacktoberfest help wanted Extra attention is needed vue

Comments

@sobolevn
Copy link
Contributor

I have been wondering if it is possible to use this library with components defined like so:

@Component
class SomeComponent extends Vue {
   mount () {
      ...
   }
}

Thanks!

@fahad19 fahad19 added help wanted Extra attention is needed vue labels Jun 18, 2018
@fahad19
Copy link
Owner

fahad19 commented Jun 18, 2018

Hey @sobolevn! thanks for the detailed issue!

I have only used Vue.js with JSX using the render() function so far.

There's also issue #12, for supporting Single File Components.

I would very much like ProppyJS to support Vue.js developers in as many ways as possible for convenience. Some PRs would be highly appreciated :)

You can start here: https://github.com/fahad19/proppy/tree/master/packages/proppy-vue/src

@fahad19
Copy link
Owner

fahad19 commented Jun 18, 2018

The attach higher-order component can also be used like a decorator. For e.g., in the React.js example:

import React from 'react';
import { withState } from 'proppy';
import { attach } from 'proppy-react';

const P = withState('counter', 'setCounter', 0);

@attach(P)
class MyComponent extends React.Component {
  render() {
    return <p></p>
  }
}

@sobolevn
Copy link
Contributor Author

@fahad19 ok, I can test this today and report.
Thanks!

ps. Really nice project! I am already using it in one of our big projects.
I will report any issues we encounter.

@fahad19
Copy link
Owner

fahad19 commented Jun 18, 2018

@sobolevn: Brilliant! 💖

Keep the feedback coming 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest help wanted Extra attention is needed vue
Projects
None yet
Development

No branches or pull requests

2 participants