/todo-challenge

Devchallenges - Legacy - Frontend-Developer - Todo Challenge

Primary LanguageJavaScript

Todo Challenge

Solution for a challenge from Devchallenges.io.

Table of Contents

Overview

Built With

Features

This application/site was created as a submission to a DevChallenges challenge. The challenge was to build an application to complete the given user stories.

Thoughts

  • useId cannot be used inside a callback.
  • debatable if switch statement used here needs a default case
  • using innerText to get the value of the filter is not preferable to using a name property on each button
  • Checkbox functionality & filtering causes many headaches. Simple solution is to limit checking only when on 'all' filter.
  • Don't want to remove checkboxes or disable them.
  • working around blocked local storage is not easy
  • focusing the all filter prevents focusing of the input field.
  • I am working on improving my testing skills. I had a few issues with testing the submit event. It can't be directly mocked (Stack Overflow) so you have to test the result of the submit event (is it in the document etc).
  • Testing when something is conditionally rendered is something I need to look into.
  • Testing is made easier by setting initial todos to be two todos (one completed and one active) versus having both active like devchallenges screenshot
  • It probably would have made writing tests easier if app was broken up into smaller components.
  • Could convert checkboxes into accessible style buttons like I have done before
  • Local Storage implementation is commented out although it works.

Useful Resources