Skip to content

usebarekey/svelte-effect-runtime

Repository files navigation

Svelte Effect Runtime

npmJSROpenVSXVS Code Marketplace


Write effectful code without any hassle. Seriously!

<script lang="ts" effect>
  import * as StockCard from "./ticker-card.ts";
  import { GetAllStocks, GetLivePrice } from "./tickers.remote.ts";
</script>

<ScrollArea>
  {#each yield* GetAllStocks as stock}
    {const liveQuery = yield* GetLivePrice(stock.ticker);
    {const price = liveQuery.current ?? stock.initialPrice}
    
    <StockCard.Root>
      <StockCard.Header>{stock.name}</StockCard.Header>
      <StockCard.Price>{stock.name}</StockCard.Price>
    </StockCard.Root>
  {/each}
</ScrollArea>

Packages

Package Description
svelte-effect-runtime Core module that houses the Vite plugin to enable effectful execution.
svelte-effect-runtime-language-server The lower level standalone server that houses the LSP contract.
svelte-effect-runtime-vsix Higher level VSIX extension that has the LSP bundled.
svelte-effect-runtime-zed Higher level Zed extension that has the LSP bundled.

Visit the docs for guides and API reference.

Packages

 
 
 

Contributors