-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Static tags #364
Comments
I actually think this would be more useful in passing attributes, because I don't think there's many use cases where the data doesn't change from within a component. |
This would be difficult to resolve with a potential syntax change to drop double-curlies for single-curlies. I like the idea in theory - though I feel like I'd rather note it in the exported object instead of the template. export default {
data() {
return {
willChange: 1,
wontchange: 2
}
}
static: [ 'wontChange' ]
} |
I would love to see this, given my predilection for using |
This is yet another issue that is basically a non-issue post-RFC-1: <script>
export let willChange = 1;
const wontChange = 2;
</script>
<p>{willChange}</p>
<p>{wontChange}</p> The same applies to modular CSS approaches: <script>
import styles from './styles.css';
</script>
<div class={styles.foo}>
...
</div> |
(To be clear, |
As noted above, this is handled in v3 by keeping track of whether there are any reassignments to a variable. Closing. |
Sometimes you know for a fact that some data isn't going to change. In those situations there's no point adding update logic.
Ractive (and I think Polymer, maybe?) allows component authors to use square brackets to denote that some data is fixed:
Gets a bit confusing when blocks are involved — need to have a clear idea about what should happen if you have curlies inside square brackets and vice versa.
The text was updated successfully, but these errors were encountered: