Skip to content

jamesfmcgrath/jfm-code-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Personal JavaScript & React Toolkit

This repository is a personal collection of reusable JavaScript utility functions and React components. The goal is to build an efficient, well-documented library of code snippets and solutions to common problems, allowing for faster development and a deeper understanding of core concepts.

Table of Contents

javascript-utils

This folder contains general-purpose JavaScript functions that can be used in any project.

string-helpers.js

This file includes functions for manipulating strings.

Function Description
capitalizeFirstLetter(str) Capitalizes the first letter of a given string.

array-helpers.js

This file contains functions for working with arrays.

Function Description
removeDuplicates(arr) Removes duplicate elements from an array.

react-components

This folder houses reusable React components.

Button.jsx

A simple, reusable button component.

Usage

<Button text="Click Me" onClick={() => console.log('Button clicked!')} />

Props

Prop Type Description
text string The text to display inside the button.
onClick function The function to be called when the button is clicked.

How to Use

To use a function or component from this library, simply import it into your project file:

// Example: Importing a helper function
import { capitalizeFirstLetter } from './my-code-library/javascript-utils/string-helpers.js';

// Example: Importing a React component
import Button from './my-code-library/react-components/Button.jsx';

Future Additions

This toolkit is a work in progress. I plan to add more utilities and components as I continue to practice and learn, including:

  • Form validation functions.
  • A custom useLocalStorage React Hook.
  • More complex components like a Modal or a Card.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published