15 Matching Annotations
- Dec 2023
-
github.com github.com
-
`.call` is a shortcut for `.new(args).call`
-
- Sep 2022
-
blog.saeloun.com blog.saeloun.com
- Dec 2020
-
github.com github.com
-
Fixes #1037 allow slotted components via making <Component> <Inner slot="foo" /> </Component> as a sugar syntax for <Component> <svelte:fragment slot="foo"> <Inner /> </svelte:fragment> </Component>
-
- Nov 2020
-
stackoverflow.com stackoverflow.com
-
If you were to check the return status of every single command, your script would look like this:
Illustrates how much boilerplate set -e saves you from.
Update: Oops, if you read a comment further below, you learn that:
Actually the idiomatic code without
set -e
would be justmake || exit $?
True that.
-
-
guides.rubyonrails.org guides.rubyonrails.org
-
You can use the match method with the :via option to match multiple verbs at once:
-
-
github.com github.com
-
Things that I miss most from Vue:
-
- Oct 2020
-
-
Arguably what is interesting about Svelte’s approach to state management is not the store itself but the auto-subscription that is possible because of the Svelte compiler. By simply appending a $ to a variable inside of a component, e.g. $myVariable, the compiler will know to expect an object with a subscribe method on it and generate the boilerplate of subscribing and unsubscribing for you.
-
- Sep 2020
-
sapper.svelte.dev sapper.svelte.dev
-
Links are just <a> elements, rather than framework-specific <Link> components. That means, for example, that this link right here, despite being inside a blob of markdown, works with the router as you'd expect
-
-
github.com github.com
-
The proposals are mostly sugar
Tags
Annotators
URL
-
- Aug 2020
-
svelte.dev svelte.dev
-
The $name += '!' assignment is equivalent to name.set($name + '!').
Tags
Annotators
URL
-
- Jul 2020
-
svelte.dev svelte.dev
-
But that's a lot of code to write, so Svelte gives us an equivalent shorthand — an on:message event directive without a value means 'forward all message events'.
-
-
svelte.dev svelte.dev
-
preventDefault — calls event.preventDefault() before running the handler. Useful for client-side form handling, for example. stopPropagation — calls event.stopPropagation(), preventing the event reaching the next element passive — improves scrolling performance on touch/wheel events (Svelte will add it automatically where it's safe to do so) capture — fires the handler during the capture phase instead of the bubbling phase (MDN docs) once — remove the handler after the first time it runs self — only trigger handler if event.target is the element itself
-
-
bugs.ruby-lang.org bugs.ruby-lang.org
-
Why don't you allow a range without end, like (1..)? There are two advantages. First, we can write ary[1..] instead of ary[1..-1]. The -1 is one of the most I dislike in Ruby. It is very magical, ugly, redundant, and disappointing. I envy Python's ary[1:]. I know that ary.drop(1) is slightly fast, but too long for such a common operation, IMO. Second, we can write (1..).each {|n| ... }.
-
-
svelte.dev svelte.devSvelte1
-
Shorthand attributes It's not uncommon to have an attribute where the name and value are the same, like src={src}. Svelte gives us a convenient shorthand for these cases: <img {src} alt="A man dances.">
Tags
Annotators
URL
-
- Nov 2019
-
github.com github.com
-
toSelf().inSingletonScope()
How does this even work? What does it do?
Tags
Annotators
URL
-