1.1.2 • Published 2 years ago

@hansolbangul/history-state v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@hansolbangul/history-state

A React hook for managing state within the browser's history.

📦 Installation

Using npm:

npm install @hansolbangul/history-state

Using yarn:

yarn add @hansolbangul/history-state

🔍 Usage

To use the useHistoryState hook:

  1. Import it:

    import useHistoryState from '@hansolbangul/history-state';
  2. Use it within your component:

    function YourComponent() {
    const [historyState, setHistoryState] = useHistoryState({ initialState: 'Your Initial State', key: 'yourKey' });
    
    // ... your component logic ...
    }

⚠️ Common Issues

Scope Naming Issue

If you encounter the following error:

npm ERR! Invalid name: "hansolbangul/history-state"

Make sure to check the name field in your package.json. It should look like this:

"name": "@hansolbangul/history-state"

Then, use the appropriate scoped name when installing or referencing the package.

🙌 Contributing

Contributions are welcomed! If you discover issues or have features to suggest, please open an issue or submit a pull request.

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago