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:
TerminalExecute CodeCopy to clipbaordnode -v
npm or yarn: npm is included with Node.js, but ensure you have the latest version by running:
TerminalExecute CodeCopy to clipbaordnpm -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):
TerminalExecute CodeCopy to clipbaordnpx 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
TerminalExecute CodeCopy to clipbaordnpm 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:
TerminalExecute CodeCopy to clipbaordnpm 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.
TerminalExecute CodeCopy to clipbaordnpm install @modjs/core @modjs/utils @modjs/helpers styled-components