fahad19/proppy

vue-class-component support

sobolevn opened this issue · 4 comments

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

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

Thanks!

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

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>
  }
}

@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.

@sobolevn: Brilliant! 💖

Keep the feedback coming 😃