Code Monkey home page Code Monkey logo

expensify's Introduction

Expensify

My first complex application that contains tests, redux and reactor router.

Table of contents

General info

Main functionality is to store expenses and count them. Thanks to this project I met the React Router and Redux. In this example I got to know the concept of application testing and the first time I turned react app on the production mode.

React Router, Redux and Reducers, Jest, Enzyme, Firebase, own Webpack config file, SCSS preprocessor

Screenshots

Example screenshot

Example screenshot

Example screenshot

Technologies

Redux React Router Jest, Enzyme

Setup

To run this project, install it locally using yarn:

$ cd ./expensify
$ yarn install
$ yarn run dev-server

Alternatively you can use npm:

$ cd ./expensify
$ npm install
$ npm run dev-server

Code Examples

Simple Header component created with fat arrow function - contains React Router
file path
const Header = () => (
    <header>
        <h1>Expensify</h1>
        <NavLink to="/" activeClassName="is-active" exact={true}>Dashboard Page </NavLink>
        <NavLink to="/create" activeClassName="is-active"> Create Expense</NavLink>
        <NavLink to="/help"  activeClassName="is-active">Help Page</NavLink>
    </header>
    );

export default Header;

With React’s stateless functional components, each component can be easily tested in isolation. No mocking, state manipulation, special libraries, or tricky test harnesses are needed.

Reducer example - catches "log in" and "log out" actions - contains Redux
file path
export default (state = {}, action) => {
  switch (action.type) {
    case 'LOGIN':
      return {
        uid: action.uid
      };
    case 'LOGOUT':
      return {};
    default:
      return state;
  }
};

Features

  • React Router
  • Redux
  • Firebase
  • Jest
  • Enzyme
  • SCSS
  • Hooks
  • Ecmascript 6

Status

Project is: finished

Inspiration

React App based on Andrew Mead budget application - recreating existing application was a great opportunity to train good practices in React

expensify's People

Contributors

lapinskap avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.