Recently, I had to implement a custom button for exporting data shown in a React JS app grid in Microsoft Excel format. The data is received from the NetSuite side using an API call and it is in ‘array of objects’ format. There are multiple libraries that help to create Excel files. But, I used… Continue reading Button for exporting data as Excel document in React JS
Tag: React Web Application
useEffect Hook in React: Managing Side Effects
What is useEffect? useEffect is a React hook that provides a way to perform side effects in functional components. Side effects are operations that occur outside the regular rendering process and often involve tasks like data fetching, subscriptions, or manually changing the DOM. Use Cases of useEffect useEffect(() => { const fetchData = async… Continue reading useEffect Hook in React: Managing Side Effects
Understanding State and Props in React Components
What is State? In React, state is a special object that represents the current condition or data within a component. It allows components to keep track of information that may change over time. What are Props? Props (short for properties) are a way to pass data from a parent component to its child components. They… Continue reading Understanding State and Props in React Components
React’s useState Hook
what is useState ? useState is a special function in React that allows functional components to use and manage state. Before hooks were introduced, state management was exclusive to class components, but with hooks, functional components can also keep track of their own state. Basic Syntax import React, { useState } from ‘react’; function ExampleComponent()… Continue reading React’s useState Hook
How to use a mapping object to replace values in a data array of objects
The requirement was to show abbreviated values for the shipping item label values sourced from the NetSuite side in a React JS web application. For this, I created a map object and stored the original names and abbreviations as key-value pairs. Used a map function to replace the values in the data object before rendering.… Continue reading How to use a mapping object to replace values in a data array of objects
Tips for creating an effective ‘Readme’ file for a software project
A README file in a software project is a text file that provides a detailed description of the project. It serves as a guide for other developers and users, offering information about the project, its purpose, how to install and run it, and any other relevant details. You can find this file in most project… Continue reading Tips for creating an effective ‘Readme’ file for a software project
How to create a React-JS application and host it on the NetSuite file cabinet
We can use the ‘Vite.js’ development tool for creating a React-JS application and deploying it to the NetSuite file cabinet. To install Vite, use the command in CMD: To create a new Vite react project(replace ‘project-name’ with actual project name): You will be able to select the framework (react) and variant(typescript) executing the previous command.… Continue reading How to create a React-JS application and host it on the NetSuite file cabinet
How to Use React in Suitelet
Here I am going to give a walkthrough to include library of react components in Suitelet. Schematic representation suitelet_react.js config.json react_lib.js demo_component.js Final Page
How to display a date object as a date value in another timezone
In Javascript, the date object does not store any specific timezone value. The time is stored in the value of the local timezone relative to GMT(Greenwich Mean Time). If we print the time object, we can see that the time is represented as a value with a sign and offset from the UTC(Coordinated Universal Time)… Continue reading How to display a date object as a date value in another timezone
Different Timezone Abbreviations and Time Offset values for Date Object Creation
Following is a list of country codes, their timezone identifiers, the timezone offset in each of these regions with respect to UTC, and the standard Timezone abbreviations for each location. These are very useful when you want to convert the time object value in a specific time zone to a time object value in a… Continue reading Different Timezone Abbreviations and Time Offset values for Date Object Creation