Save state of your React app in URL!
Get support Β»
Report Bug
Β·
Request Feature
- Using yarn:
yarn add react-state-query - Using npm:
npm i react-state-query
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;Copyright Β© 2023 BarΔ±Ε DEMΔ°RCΔ°.
Distributed under the GPL-3.0 License. See LICENSE for more information.
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
Give a βοΈ if this project helped you!
- Mail: demirci.baris38@gmail.com
- Discord: https://discord.gg/BjEJFwh
- Instagram: https://www.instagram.com/ben_baris.d/