This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
// JavaScript compiler options | |
"compilerOptions": { | |
// Set the base URL for all relative module imports. | |
// This helps in having cleaner and shorter import paths. | |
"baseUrl": ".", | |
// Define path aliases for commonly used directories. | |
// This improves the readability of import statements. | |
"paths": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"compilerOptions": { | |
// Set the base URL for all relative module imports | |
"baseUrl": ".", | |
// Define path aliases for shorter and cleaner imports | |
"paths": { | |
"@src/*": ["src/*"], | |
"@components/*": ["src/components/*"], | |
"@utils/*": ["src/utils/*"], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Push an Item to the Array | |
function pushItem(arr, item) { | |
arr.push(item); | |
} | |
// 2. Pop an Item from the Array | |
function popItem(arr) { | |
arr.pop(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { createContext, useContext, ReactNode, useMemo } from 'react'; | |
/** | |
* Props for conditional rendering components. | |
*/ | |
interface ConditionalProps { | |
children: ReactNode; | |
} | |
/** |