LayerChart 2.0 Released
▲ 96 r/datavisualization+1 crossposts

LayerChart 2.0 Released

Sean Lynch

This includes the Svelte 5 rewrite, CSS framework agnostic, improved API and state, numerous new components and chart types, and so much more!

u/thebreadmanrises — 2 days ago

No need for svelte.config.ts in latest version of SvelteKit

Logic can now be used via vite.config.ts: Update

Example:

import
 { sveltekit } 
from
 '@sveltejs/kit/vite';
import
 { defineConfig } 
from
 'vite';
import
 tailwindcss 
from
 '@tailwindcss/vite';
import
 adapter 
from
 '@sveltejs/adapter-auto';
import
 { vitePreprocess } 
from
 '@sveltejs/vite-plugin-svelte';


export
 
default
 defineConfig({
    plugins: [
        sveltekit({
            preprocess: vitePreprocess(),
            compilerOptions: {
                experimental: {
                    async: true
                }
            },
            alias: {
                $db: 'src/lib/server/db',
                $ui: 'src/lib/components/ui',
                $utils: 'src/lib/utils',
                $constants: 'src/lib/constants'
            },
            experimental: {
                remoteFunctions: true
            },
            adapter: adapter()
        }),
        tailwindcss()
    ],
    ssr: {
        noExternal: ['layerchart']
    }
});
reddit.com
u/thebreadmanrises — 1 month ago

Any updates on SvelteKit 3 or remotes becoming stable?

Has there been any indication when remote functions/async svelte will be moved out of the experimental phase?

reddit.com
u/thebreadmanrises — 1 month ago

Those with > $1m in ETFs (not super)

  • How does it feel and has it changed your life much?
  • Does your income/capital gains cover your expenses?
  • Do you still work full-time?
  • Do you still reinvest?
reddit.com
u/thebreadmanrises — 2 months ago

Tanstack Start + Query seems very complex.

Has anyone else found Tanstack Start + Query very complex?

Looking as this createFileRoute & the component page there is a lot of boilerplate going on:

export
 const Route = createFileRoute('/(app)/_layout/clients/')({
  component: ClientListPage,
  validateSearch: searchSchema,
  errorComponent: () => <div>Error loading clients</div>,
  loaderDeps: ({ search: { sort, order } }) => ({ sort, order }),
  loader: async ({ context: { queryClient }, deps: { sort, order } }) => {
    
await
 queryClient.ensureQueryData({
      queryKey: clientKeys.list(sort, order),
      queryFn: () => getClients({ data: { sort, order } }),
    })
  },
})


function ClientListPage() {
  const queryClient = useQueryClient()
  const navigate = useNavigate()
  const { sort, order } = Route.useSearch()


  const { data: clients } = useSuspenseQuery({
    queryKey: clientKeys.list(sort, order),
    queryFn: () => getClients({ data: { sort, order } }),
    staleTime: 5 * 60 * 1000,
  })

I also find the use of the query client with the router complex.

reddit.com
u/thebreadmanrises — 2 months ago