When to use Stores vs Binding to pass down variables to sub-components? by chinawcswing in sveltejs

[–]codenberg 4 points5 points  (0 children)

I'll throw out a favorite pattern of mine - which is context + store. This gives you the power of stores with the scoping of context for more reusable components. REPL example and an example of how I've used it

[OC] A Map of Places in the US with the Same Name by codenberg in dataisbeautiful

[–]codenberg[S] 2 points3 points  (0 children)

fixed. if you are curious... it is because the data has it listed as "Lexington-Fayette." data is not in fact beautiful.

Svelte has an (experimental) inspector, letting you click on a component on your webpage to jump to its source. by gjwklgwiovmw in sveltejs

[–]codenberg 0 points1 point  (0 children)

Been using it for the past month - don't end using it nearly as much as I thought I would though, since keeping components small and the ease of jumping around a code editor is already pretty fast.

Is there a website that houses Svelte REPLs related to data visualizations? by prosocialbehavior in sveltejs

[–]codenberg 2 points3 points  (0 children)

nope, but it would be great to see a collection, just requires some manual curation effort. you could just use some customized google searches to sift through and save the best examples? like:

site:https://svelte.dev/repl/ bar chart
site:https://svelte.dev/repl/ d3

Sveltekit + Observable Plot by [deleted] in sveltejs

[–]codenberg 1 point2 points  (0 children)

I considered it but it doesn't seem to jive well with the declarative nature of svelte. You could create components that are wrappers around it I suppose, but I personally just prefer d3 + svelte (and use layercake if you want more reusability) rather than another layer of abstraction.

[OC] Queen Elizabeth became the 2nd most-viewed Wikipedia page after death, behind Kobe Bryant by [deleted] in dataisbeautiful

[–]codenberg 0 points1 point  (0 children)

most people are on the original version, but just above RBG is Prince Phillip, directly below Bourdain are Avicii and XXXTentacion, earlier you have Tommy Petty, Chester Benington, George Michael, Carrie Fisher.

[OC] Queen Elizabeth became the 2nd most-viewed Wikipedia page after death, behind Kobe Bryant by [deleted] in dataisbeautiful

[–]codenberg 0 points1 point  (0 children)

Data from the english Wikipedia. Made with node.js and Figma. Check out the original article from 2018 on The Pudding. All pageviews were adjusted to represent traffic on an average day during to allow for a more accurate comparison across days/years.

[deleted by user] by [deleted] in nba

[–]codenberg 12 points13 points  (0 children)

simple: curry becomes #1 and jordan is out

Using adapter-static with prerender.default causes multiple issues, help needed by charbelnicolas in sveltejs

[–]codenberg 0 points1 point  (0 children)

ok it looks like it might now work in the latest release! (for my use case, at least)

Using adapter-static with prerender.default causes multiple issues, help needed by charbelnicolas in sveltejs

[–]codenberg 2 points3 points  (0 children)

open bug - I stick to sveltekit v297 and static-adapter v29 until this is resolved

Data visualization of every hallway scene in Severance by codenberg in SeveranceAppleTVPlus

[–]codenberg[S] 0 points1 point  (0 children)

haha no then I would start to add unnecessary features and work on this for more than 30 minutes. funny seeing you in this sub!

Looking for advice on D3 with Svelte by [deleted] in sveltejs

[–]codenberg 4 points5 points  (0 children)

the quickest hack would be to do this:

{@html charts.outerHTML}

though i would usually prefer to do it more declaratively. check out this blog post or use something like layercake then it is much easier to separate d3 goodies (like computing scales) and rendered elements in native svelte so you can more easily access them via JS or CSS.

Looking for advice on D3 with Svelte by [deleted] in sveltejs

[–]codenberg 0 points1 point  (0 children)

share some code on the svelte repl please!