Installation

This installation guide will help you get started with installing and using the core library in your React projects.

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Node.js: Make sure you have Node.js installed. You can download it fromhere. Verify that you have Node.js installed by running:

    Terminal
    Execute Code
    Copy to clipbaord
    node -v
  • npm or yarn: npm is included with Node.js, but ensure you have the latest version by running:

    Terminal
    Execute Code
    Copy to clipbaord
    npm -v
  • React: The core library is designed to work withReact. Ensure you have a React project set up. You can create a new React project using Create React App (CRA):

    Terminal
    Execute Code
    Copy to clipbaord
    npx create-react-app my-app cd my-app

Peer Dependencies

The core library has peer dependencies that you need to include in your project. All components under @modjs/core has been thoroughly tested with the following versions of peerDependencies. The library will then use the version of the following peerDependencies that you install in your project.

  • React: >=18.3.1

  • React DOM: >=18.3.1

  • Styled Components: >=6.1.11

Terminal
Execute Code
Copy to clipbaord
npm install react react-dom styled-components

Dependencies

The core library itself is dependent onutils andhelpers package from Mod.js. To install these dependencies, run the following command:

Terminal
Execute Code
Copy to clipbaord
npm install @modjs/utils @modjs/helpers

Quick Install

After you have Node.js and npm installed and have React app configured and running, you can run the following command to install all dependencies for @modjs/core.

Terminal
Execute Code
Copy to clipbaord
npm install @modjs/core @modjs/utils @modjs/helpers styled-components