-
Notifications
You must be signed in to change notification settings - Fork 19
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
New Writing For Lego #38
base: master
Are you sure you want to change the base?
Conversation
Should this PR points to the |
The v2 branch is already based on this PR 👍 Currently the proposal looks like this: <script>
const state = { name: 'Joe' }
function toggle() {
this.render({ name: this.state === 'Joe' : 'Billy' : 'Joe' })
}
</script>
<template>
<button @click="toggle"></button>
</template>
thoughts are welcome 👐 |
This may be a new major version of Lego as the default writing is changed, yet compatible with Lego so far.
Extending the component itself is still accessible as before.
If using the new style writing, an "extend" will do the difference:
<script extend>
.If you only use 1 single script tag then you can skip the attribute:
The output that Lego generates is still very light, even more readable and therefore to debug: