Skip to content

mauget/elm-todo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elm-todo

This is a simple self-contained TODO list implemented in Elm. It uses simple demo persistance via html 5 localstorage saveItem and loadItem

Try

Carry out the following steps:

  1. Ensure that Elm infrastructure is installed: https://guide.elm-lang.org/install.html
  2. Clone the repo from https://github.com/mauget/elm-todo.git
  3. Compile Main.elm to elm.js using a command from the project root: elm make src/Main.elm --output=elm.js
  4. Open ./index.html in a browser; no server needed for this application

We added layout and style to the UI via index.html links to Bootstrap 4 CSS and local styles. A screenshot of the app follows.

Styled todo image

Persistance

Local storage, as used here, is simplistic demo persistance. It caches the todo list via an Elm flag and port, using JavaScript within the index.html <script> tag. The downside:

  • Each persisted todo collection exists uniquely in each given vendor browser-URL.
  • Distinct tabs or windows of a given browser-url combination replace the single list at each UI event.

Realistic multi-client data persistence could be implemented via Elm http. See An Introduction to Elm - HTTP.

Development Environment

Follow the guidelines at Elm Language Intallation

References

About

Simple TODO list implmented in Elm

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages