"SimpleToast" is sample code of a very basic toast notification component for React.
A toast is aka a snackbar... a temporary notification to the user after some action (such as a
button click). A use case is UI feedback; i.e. show response (like "Item Added") after button
click. This is sample code for an toast component in an MPA.
This repo is for Web built using create-react-app
(see docs). It can be used as
starter-kit for the MPA or combined with an SPA monorepo, like SimpleApp for
Mobile use on iOS & Android.
- Get the repo
- From root directory, do
yarn
Required Basic ReactJS knowledge. If repo user needs review, please read this
For web, from the root directory, do
node_modules/.bin/webpack -p --progress
node_modules/.bin/webpack-dev-server --content-base public/ --config ./webpack.config.js --inline --hot --colors
- Manually open a browser to localhost:8080 to see webapp
- Live Demo at Firebase Hosting
- Google PageSpeed Analysis (desktop | mobile)
- SimpleToast on iOS
- SimpleToast on Android
- SimpleToast Webapp
- CSS is minimal and MUI
- ServiceWorker (for PWA) not used
- Component is statefull ; does not use Redux
- Assets (css, images, etc.) are copied during build process
- Custom components for Header & Footer included. Can be refactored as needed