๐Ÿ“ฆ mlynch / ionic-react-hooks-demo

Basic demo using hooks with Ionic React

โ˜… 19 stars โ‘‚ 5 forks ๐Ÿ‘ 19 watching
๐Ÿ“ฅ Clone https://github.com/mlynch/ionic-react-hooks-demo.git
HTTPS git clone https://github.com/mlynch/ionic-react-hooks-demo.git
SSH git clone git@github.com:mlynch/ionic-react-hooks-demo.git
CLI gh repo clone mlynch/ionic-react-hooks-demo
Max Lynch Max Lynch Remove old useState b18a41c 6 years ago ๐Ÿ“ History
๐Ÿ“‚ master View all commits โ†’
๐Ÿ“ public
๐Ÿ“ src
๐Ÿ“„ .gitignore
๐Ÿ“„ package-lock.json
๐Ÿ“„ package.json
๐Ÿ“„ README.md
๐Ÿ“„ ss1.png
๐Ÿ“„ yarn.lock
๐Ÿ“„ README.md

Ionic React Hooks Demo

This is a simple demo using Ionic React and React Hooks that shows how to use a number of hooks, including useState, useContext, useReducer, useCallback, and even custom hooks!

This app fetches 10 random images from the Dog API, storing the last set offline for loading the next time you boot the app.

One of the fun things about this app is that it contains a tiny implementation of redux with automatic persistence to localStorage, all using hooks and no external dependencies!

Running the project:

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

npm run eject

Note: this is a one-way operation. Once you eject, you canโ€™t go back!

If you arenโ€™t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point youโ€™re on your own.

You donโ€™t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldnโ€™t feel obligated to use this feature. However we understand that this tool wouldnโ€™t be useful if you couldnโ€™t customize it when you are ready for it.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

npm run build fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify