Skip to content

Kelvur/react-hooks-data-structures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Hooks Data Structures

The purpose of this project is to bring you basic data structures through React hooks.

Installation

Use the package manager npm to install react-hooks-data-structures.

npm i react-hooks-data-structures

Usage

import { useLinkedList } from 'react-hooks-data-structures/LinkedList';


const SomeComponent = (props) => {
  const linkedList = useLinkedList();

  const handleClick = useCallback((evt) => {
    linkedList.add(evt.target.value);
  }, []);

  return (
    <>
      {linkedList.map((value, idx) => <Item key={idx}>{value}</Item>)}
    </>
  )
}

License

MIT

About

Data Structures through React Hooks

Resources

Stars

Watchers

Forks

Packages

No packages published