Git Product home page Git Product logo

lit.todomvc's Introduction

Lit.TodoMVC

Sample Fable.Lit app. To start a development server run:

npm install && npm start

Other commands:

npm test                        # Run tests
npm run test:watch              # Run tests in watch mode
npm test -- --update-snapshots  # Update test snapshots
npm run build   # Build optimized site for deployment and put in dist/

Vite.js repository structure conventions

  • Put static files in public/ folder
  • Put index.html in app root (next to package.json)
  • Add a reference to the entry JS file (relative path is important):
<script type="module" src="./build/client/App.js"></script>

lit.todomvc's People

Contributors

alfonsogarciacaro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

algunion ardave

lit.todomvc's Issues

Build fails with resolve import "lit-html/directives/until.js" from "build/client/App.js".

build fails with

3 modules transformed.
[vite]: Rollup failed to resolve import "lit-html/directives/until.js" from "build/client/App.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
error during build:
Error: [vite]: Rollup failed to resolve import "lit-html/directives/until.js" from "build/client/App.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
    at onRollupWarning (/Users/onurgumus/.nvm/versions/node/v16.9.0/lib/node_modules/vite/dist/node/chunks/dep-e0fe87f8.js:43253:19)
    at onwarn (/Users/onurgumus/.nvm/versions/node/v16.9.0/lib/node_modules/vite/dist/node/chunks/dep-e0fe87f8.js:43037:13)
    at Object.onwarn (/Users/onurgumus/.nvm/versions/node/v16.9.0/lib/node_modules/vite/node_modules/rollup/dist/shared/rollup.js:22994:13)
    at ModuleLoader.handleResolveId (/Users/onurgumus/.nvm/versions/node/v16.9.0/lib/node_modules/vite/node_modules/rollup/dist/shared/rollup.js:22338:26)
    at /Users/onurgumus/.nvm/versions/node/v16.9.0/lib/node_modules/vite/node_modules/rollup/dist/shared/rollup.js:22310:26

CSS transitions on sorting

Hi.

The demo at https://alfonsogarciacaro.github.io/Lit.TodoMVC/ has a checkbox for sorting the list
and includes these nice CSS transitions when the list is reordered.

Is there any chance to see that code as well ... I couldn't find that checkbox in the code in this repo.

Btw, I just got myself acquainted with Lit and already love it 100% (also, thanks for the library and the posts ).

To learn Lit, I adopted your demo from Elmish to FSharp.Data.Adaptive and it was absolutely fantastic, how easy it was to define Hooks for Adaptive...
All that was needed was this: https://github.com/pkese/Lit.Adaptive.TodoMVC/blob/main/src/Util.fs#L20

I have a business data visualization app built with Adaptive and I really appreciate the fact that Adaptive updates the state tree lazily (/i.e. selectively): if some components are not mounted, the part of the state tree linking to those components will remain dark and won't get updated at all.
(I think that other state libraries based on Observables simply render full state each time).

So now I can port my old code from React and Fable.Elmish.Adaptive to Lit with these cool Hooks.
(Adaptive will need a few trivial fixes on upstream to get it compatible with Fable 3 though).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.