4 Matching Annotations
- Mar 2021
-
www.jackfranklin.co.uk www.jackfranklin.co.uk
-
Svelte is different in that by default most of your code is only going to run once; a console.log('foo') line in a component will only run when that component is first rendered.
Tags
- opinionated
- turning things around / doing it differently
- important point
- Svelte vs. React
- opinion
- trying to doing things the same way you did in a different library/framework (learning new way of thinking about something / overcoming habits/patterns/paradigms you are accustomed to)
- unfortunate defaults
- reasonable defaults
- difference
Annotators
URL
-
- Oct 2020
-
github.com github.com
-
Svelte doesn't re-render, so you need to respond to component mount/dismount and prop changes separately as they are distinct concepts and never tied together, unlike in React.
Tags
- UI library: reacting to prop changes
- different way of thinking about something
- lifecycle callbacks
- trying to doing things the same way you did in a different library/framework (learning new way of thinking about something / overcoming habits/patterns/paradigms you are accustomed to)
- distinction
Annotators
URL
-
-
medium.com medium.com
-
Sometimes, you may be tempted to write that wrapper. Because all your (React or Vue or insert your reactive framework here) instincts tell you so.Resist the temptation. There is a better way. A svelter way. Introducing: the use-directive (a.k.a. “actions”).
-
However, especially when starting out, it’s very easy to fall into the “this is how I did things in my previous framework” trap.
Tags
- overcoming preconceived opinions
- Svelte: action (use:)
- trying to doing things the same way you did in a different library/framework (learning new way of thinking about something / overcoming habits/patterns/paradigms you are accustomed to)
- different way of thinking about something
- Svelte
- paradigm shift
- getting a fresh perspective
Annotators
URL
-