Skip to content

jmcclare/investment-calc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

investment-calc

A React app that simulates investment growth and returns over time.

The app is a site module that works in my Node.js Koa site template. It can also work in any project setup to compile JSX.

See it live.

Installation

First, follow the instructions to install the Node.js Koa site template.

git clone git@github.com:jmcclare/koa-template.git app
cd app
rm -rf .git

Clone this repository into the site_modules directory.

cd site_modules
git clone git@github.com:jmcclare/investment-calc.git
cd investment-calc
rm -rf .git

Symlink the JSX and Stylus directories into the main app’s assets.

ln -s ../../site_modules/investment-calc/assets/_js ../../assets/_js/investment-calc
ln -s ../../site_modules/investment-calc/assets/_css ../../assets/_css/investment-calc

Import the Stylus in the main app’s assets/_css/site.styl.

@import './investment-calc'

Import and render the React app in the main app’s assets/_js/react-app.jsx.

import React from 'react'
import ReactDOM from 'react-dom'

import ICalc from './investment-calc'

ReactDOM.render(
  <ICalc />,
  document.getElementById('react-root')
)

In the default Koa template site the investment calculator will show up on the “React Sample” page.

About

A React app that simulates investment growth and returns over time.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors