react-state-query
v1.0.1
Published
🚀 Save state of your React app in URL!
Downloads
4
Readme
📦 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.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/my-feature
) - Run prettier and eslint (
npm run format && npm run lint
) - Commit your Changes (
git commit -m 'my awesome feature my-feature'
) - Push to the Branch (
git push origin feature/my-feature
) - Open a Pull Request
🔥 Show your support
Give a ⭐️ if this project helped you!
📞 Contact
- Mail: [email protected]
- Discord: https://discord.gg/BjEJFwh
- Instagram: https://www.instagram.com/ben_baris.d/