Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1023 Bytes

README.md

File metadata and controls

26 lines (18 loc) · 1023 Bytes

MouseTrap

This is an exploration of react hooks while having fun with content and using react-bootstrap components.

Things used in this web example:

Hooks

I've used several of the basic hooks, shown in many examples. One thing that stood out for me, was how to use an effect when calling async functions. there needs to be an ignore flag to prevent the state from being cleared. This is shown in the trapdetail.js and trapList.js files.

hooks used so far:

  • useState
  • useReducer
  • useEffect

I'd like to add the useContext for a more global handling of the login state.

Data

I've abstrated the data interface so the site can be easyly configured to use any backend. Currenly the site uses local storage.