Discover and read the best of Twitter Threads about #each

Most recents (8)

“interconnection queues” and obtaining the necessary #ImpactStudies and #permits from #each grid operator has risen from around 2.1 years for projects built in 2000-2010 to around 3.7 years for those built in 2011-2021.

#decentralizedgrid issues are key.…
"researchers found that only 23% of the projects seeking grid connection between 2000 and 2016 have actually been built."

“The grid operators have limited staff to conduct these studies,”
“Maybe they haven't ramped up their workforce quickly enough.”

The inability of #renewables to deliver #LargeScale solutions may NOT be due to #financing constraints. #Regulatory ones matter too.

As prices fall, the gap btw #LevelisedCostOfEnergy for #Rooftop and #SolarUtility shows, scale matters.

Read 3 tweets
I've a experimented with a few different ways of handling SVG icons in Svelte. Here's a brief thread about the workflow that I'm enjoying lately.

I looked at using <img> tags, directly inlining the SVG, and passing the SVG as a component. Of these three, the last is the one that seems to result in the most maintainable code
I originally used a <slot>, and passed the icon component into it. This works, but not when generating the components dynamically: code sample showing a butto...code sample showing a card ...
Read 8 tweets
If you have a promise waiting for your data, {#await} block makes it easy to express your content in the loading 🕑, resolved ✅ and rejected ❌ state

So, let's talk about the {#await} block in @sveltejs

Here's the general structure for the {#await} block

🕑 {#await}
✅ {:then}
❌ {:catch}
👋 {/await}

[1/4] <script>   let promise; </s...
All the states are optional, so you could have

😜 no loading state
😆 no resolved state
😅 no rejected state

[2/4] <script>   let promise; </s...<script>   let promise; </s...<script>   let promise; </s...
Read 8 tweets
We've seen how we can use {#each} to repeat content in @sveltejs ,

let's talk about the keyed each block, and what does it mean to have a key for each block

📹If you prefer learning through video, the following thread is a summary from my @YouTube video

💡 You can always subscribe to my channel to get notified for the next awesome content!

Read 14 tweets
HTML doesn't have a way of expressing logic, like conditionals and loops. @sveltejs does.

Let's take a look at the 1st logic block in @sveltejs, 👉 {#if} 👈

If you prefer watching video, the following thread is a summary from my @YouTube video
💡{#if} is our 1st logic logic block in @sveltejs
💡it allow us to conditional render content
💡if comes with else, else if, just like you would expect in JavaScript <script>   let value = 42; </script>  {#if value === 42}   <
Read 8 tweets
Always wanted to check out @sveltejs (aka. "the next big thing in web dev") but never got time for it? ⏰

🔥 I've got a 10-tweet crash course for you! 👇

(Spoiler alert: Svelte is so intuitive and easy to use that you may feel like you already know it! 🥳)

#javascript #svelte
How Svelte works:

- Compiler: Doesn't ship a Svelte "library" to users, but build-time optimized plain JS
- Components: App is made up of composable UI elements
- Reactive: Event/User interaction triggers chain of state changes, autoupdating components throughout entire app
UI is a component tree. A component defines how your app should interpret some abstract "state" values, so that it can turn them into DOM elements in your browser, and ultimately pixels on your screen.
Read 17 tweets
Okay, I've managed to create this @sveltejs JIRA/Kanban board with Todo/In Progress/Done states with a single item moving through those on click.

I've been trying for quite some time and I don't think it's possible to fit it in a single tweet :(

Maybe someone will be able to 🤔
REPL can be found here:…

let t,d,o,q=1,w=2,r=3,a=[{k:1,l:0,s:q}],s=(a,q)=>a.filter(x=>x.s==q),u=(z,n)=>a[a.findIndex(h=>h.k==z)].s=n


Read 5 tweets
National DNA Day:

🧬April 25

🧬Commemorates the day in 1953 when Watson, Crick, Wilkins, Franklin and colleagues published papers in the journal @nature on the structure of DNA

🧬Also commemorates the completion of the Human Genome Project in April 2003, took 13 years

DNA Double Helix:

🧬The two #DNA strands are reverse-complements

🧬Reading one strand in #reverse order and exchanging each base with its #complement gives the other strand

🧬A and T are complements, C and G are complements

Reverse-Complement: ATGCTACT
In #Each DNA Strand:

🧬Pull the #DNA double helix apart, leaving the two single DNA strands

🧬The population (or occurrence) of every DNA sequence in that single-strand is #equivalent to the population of its reverse-complement DNA sequence in that same single-strand

Read 5 tweets

Related hashtags

Did Thread Reader help you today?

Support us! We are indie developers!

This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!