Posts

Showing posts from April, 2020

Tutorial: Simple Ionic 5 App with React Context (using React Hooks) as well as Local Storage

Image
Introduction My name is Alex and I teach SWEN 325 course at Victoria University of Wellington that is called "Software Development for Mobile Platforms": https://www.wgtn.ac.nz/courses/swen/325/2019/offering?crn=30041 While preparing for the 2020 iteration of the course I could not easily find a self-contained tutorial describing a simple Ionic 5 App with React backend that would use both local storage and hooks to utilise contexts to maintain state between different components. The closest I found was easy to follow "Your First Ionic App: React" tutorial that covers storage but not hooks or contexts: https://ionicframework.com/docs/react/your-first-app And separate and somewhat more abstract and thus a little harder to follow blog post that covers hooks for contexts but not storage: https://ionicframework.com/blog/a-state-management-pattern-for-ionic-react-with-react-hooks/ Thus, all this tutorial does is make a simple App which will make use of the l