Create React App Folder Structure node_modules: All external libraries will be stored here. No need to edit any single line code of this folder. public: This folder contains all static files such as robots.txt, logo, ads.txt etc. src: We’ll do most of the things in this folder. package.json: It contains all metadata information about the… Continue reading Create Your First React Web Application
Author: Anik Babu
Use Font Awesome, Bootstrap, Weather and More Icons in React
Install react-icons Font Awesome Icons Devicons Weather Icons
How to Run Foreach Loop in React
Basic Example Loop with Index Multidimensional Array
How to Filter Arrays in React
Filter Single Array Filter Multidimensional Array Filter Single Array This condition will print all student names that contain character “K“. The final code looks like: Filter Multidimensional Array From this array, we want to get those students under the age of 30. So, the condition should be: The complete React component code:
How to Refresh / Reload a Component and Page in React
Refresh Page To refresh a page you don’t need react-router. We want to reload a page by clicking a button. Here’s the example: Refresh Component Using this.setState() method, we’re able to refresh a component only: By using useState() react hook, we can reload a component too:
Proposal For SCA – Clutch Integration
Proposal Summary This proposal covers both the functional and UI development for Checkout page in SCA webstore and NetSuite for CyberCaptains website. The pages that will be updated listed below; Checkout Requirement Integrate the clutch loyalty program with the Suitecommerce website and NetSuite. Our Solution Prerequisites The extension has managed the sales order and… Continue reading Proposal For SCA – Clutch Integration
Proposal For SCA – Loyalty reward program implementation in SCA and Netsuite
JIRA TASK :https://jobinandjismi.atlassian.net/browse/CC-2 Proposal Summary This proposal covers both the functional and UI development for Checkout page in SCA webstore and NetSuite for CyberCaptains website. Requirement Integrate the SCA – Loyalty reward program with the Suitecommerce website and NetSuite. Our Solution In the website, we will need to create a module in the checkout… Continue reading Proposal For SCA – Loyalty reward program implementation in SCA and Netsuite
How to Set & Remove Cookie in React
Install Cookie Package & Config We’ll use the react-cookie package. It’s very popular. Run the below command to install it: Now we have to import the CookiesProvider component from the react-cookie package and wrap your root app component with it. Set Cookie To set a cookie, we need to import the useCookies() hook from the react-cookie package. Access Cookie We can retreive the user cookie… Continue reading How to Set & Remove Cookie in React
React Mouse onHover Event
Show and Hide Content On hover an element, we can take an action. I’m going to show & hide content on hover a button. To do this, we’ll use 2 event handlers: onMouseEnter onMouseLeave Let’s have a look at the example:App.js Now if we hover the button, It works..! text will appear. Change Background Color In this… Continue reading React Mouse onHover Event
Array Map Function in React.js
Map is a collection of elements where each element is stored as a key, value pair. Map object can hold both objects and primitive values as either key or value. It’s like PHP’s foreach loop. Let’s try to render an array using map function in React app: App.js