djbowen95 / Hit-the-Bucket

Front-end BUCKET LIST application built with REACT. Users can add, update or delete items from a bucket list - which persists when they refresh or revisit the page. Uses STATE, HOOKS, COMPONENTS, PROPS, conditional rendering, forms and event handling. Built from starter code.
https://djbowen95.github.io/Hit-the-Bucket/
MIT License
0 stars 0 forks source link

Error handling for adding new items to the bucket #12

Open djbowen95 opened 1 year ago

djbowen95 commented 1 year ago

The form for adding new items to the bucket currently will accept any text value. The handleSubmit defaults an 'eagerness' level; the id is autogenerated; but the 'text' value itself can currently be anything.

I would like to have something that checks:

I would like an error to be sent to the user, possibly just as an alert pop-up, if these values are not met.

I might want to build unit tests using the React Testing Library in parallel to building these features: this would be very easy to write unit tests for.