Re:Ask HN: Overwhelmed with learning front-end, how do I pro...
by woogley on Sunday November 06, 2016 @08:19AM
(#12884930)
It can even be closer to React than that, especially with JSX render functions. You don't even need the view to name itself:
export default Vue.extend({
props: ['text'],
render() {
return <div>I am a button <button>{this.text}</button></div>;
}
});
1. Create your custom component:
2. Register it: 3. Display it: That's anything but hard. Here: https://jsfiddle.net/v5s77r2x/.*Updated with simpler code and JSfiddle example