Coder Social home page Coder Social logo

beer-catalog's Introduction

Beer Catalog v0.1.0

The Beer application fetches information about 30 unique beers and renders it.

To get started:

  • Clone the application: git clone URL
  • Install the dependencies: npm install
  • Start the application: npm start

Application architecture

There are 4 main directories in the src folder:

  • pages - This module stores application pages, where different components form a layout.
  • components - Every component that is not a page should go in the components folder. The components folder in general includes reusable and feature-specific components.
  • hooks - It includes custom hooks that are used across the application.
  • utils - utils directory consists of reusable, stateless functions.

Adding new (page)feature requires the following steps:

  • Create feature-specific and reusable components in the components directory.
  • Create a folder in the pages directory where different components form a layout.
  • Add custom hooks needed for the functionality in the hooks folder.
  • Add a new page(exported from pages) to the App.tsx

There are rules on how to create new components in the modules:

  • Create a directory and component with the same name (for example, Card and Card.tsx).
  • Create a file [componentName].module.scss where the component styles will go.
  • Create an index.ts file that acts as an entry point to that component. From that file, you should export the component with a default export as well as all the necessary functions.

Additional notes:

  • Use JSDoc for documenting the custom hooks.
  • Use the utils folder for reusable, small functions. These functions must be stateless, meaning that they don't need to be initialized.

beer-catalog's People

Contributors

vanoakofashvili avatar

Stargazers

 avatar

Watchers

 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.