react-state-query
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

stars license supportServer forks issues

Logo

React State Query

Save state of your React app in URL!
Get support »

Report Bug · Request Feature

📦 Installation

  • Using yarn: yarn add react-state-query
  • Using npm: npm i react-state-query

🤓 Usage

Real-life example: https://react-state-query.glitch.me

import { useStateQuery } from "react-state-query";

function App() {
	const [value, setValue] = useStateQuery(
		"query-key",
		"default value not required",
	);

	return (
		<div>
			<input
				type="text"
				value={value}
				onChange={(e) => {
					setValue(e.target.value); // query also updated, refresh the page and see the same value
				}}
			/>
		</div>
	);
}

export default App;

📄 License

Copyright © 2023 Barış DEMİRCİ.

Distributed under the GPL-3.0 License. See LICENSE for more information.

🧦 Contributing

Feel free to use GitHub's features.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/my-feature)
  3. Run prettier and eslint (npm run format && npm run lint)
  4. Commit your Changes (git commit -m 'my awesome feature my-feature')
  5. Push to the Branch (git push origin feature/my-feature)
  6. Open a Pull Request

🔥 Show your support

Give a ⭐️ if this project helped you!

📞 Contact

Readme

Keywords

none

Package Sidebar

Install

npm i react-state-query

Weekly Downloads

1

Version

1.0.0

License

GPL-3.0

Unpacked Size

68.1 kB

Total Files

9

Last publish

Collaborators

  • leydihavuc