React
currency converter component (widget)
What inside this README:
- Description
- Terminal Commands
- TO DO next
- Setup
- Demo
Description:
This small project is about currency converter based on API rate source on Fixer.io
.
- Uses
React
library - Link - Build system setup with Webpack
- This app converts currency from 'CAD, USD, EUR' to 'CAD, USD, EUR' rate
- This component
widget
can be plugged into any other page or component in the project
Terminal Commands:
npm install
-- Install all dependenciesnpm start
-- Run app on localhost:8000 and watches for changes
TO DO next:
- Add more currency rate option
- Improve responsive widget
- Implement HTML template using AEM Sightly/HTL (use mock references to a Sling model and i18n labels)
- Improving performance and load
- Test for data, REST API and React components
- Improve state changes using
Flux
pattern - Clean up
Webpack
to have live reload properly as now you will need to restart the webpack every time you have changed the work(s) and als to have clean environment forProduction
Setup:
-
Clone the project from
github
-
Run
npm install
and make sure that all dependencies installed- To verify everything works you can test by running
npm start
commands and viewing on localhost:8000
- To verify everything works you can test by running
-
To deploy to production for local testing:
- The file in the
dist
folder is closed to production file which you can copy and test anywhere you want to. - To test with XAMPP, copy
dist
folder intoC:\xampp\htdocs
(or any path you use XAMPP) folder and renamedist
folder tocurrencyconverter_react
or any name you like and that is it. - It is time to test currency converter.
When you input the currency number into the box then the rate will calculate and show in the converted rate box below.
- The file in the
Demo: Click here