vue-class-component support
sobolevn opened this issue · 4 comments
sobolevn commented
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 commented
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 commented
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>
}
}