Skip to content

ecook/mousetrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

An exploration of React Hooks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published