How to use the react-router-use-location-state.useQueryState function in react-router-use-location-state

To help you get started, we’ve selected a few react-router-use-location-state examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github xiel / use-location-state / src / examples / react-router-use-location-state / src / pages / QueryStateDemo.tsx View on Github external
export default function QueryStateDemo() {
  const [name, setName] = useQueryState('name', 'Sarah')
  const [age, setAge] = useQueryState('age', 25)
  const [active, setActive] = useQueryState('active', false)

  return (
    <div>
      <h2>Intro</h2>
      <p>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquid architecto, atque,
        corporis debitis esse.
      </p>
      
      <h4>name</h4></div>
github xiel / use-location-state / src / examples / react-router-use-location-state / src / pages / QueryStateDemo.tsx View on Github external
export default function QueryStateDemo() {
  const [name, setName] = useQueryState('name', 'Sarah')
  const [age, setAge] = useQueryState('age', 25)
  const [active, setActive] = useQueryState('active', false)

  return (
    <div>
      <h2>Intro</h2>
      <p>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquid architecto, atque,
        corporis debitis esse.
      </p>
      </div>
github xiel / use-location-state / src / examples / react-router-use-location-state / src / pages / QueryStateDemo.tsx View on Github external
export default function QueryStateDemo() {
  const [name, setName] = useQueryState('name', 'Sarah')
  const [age, setAge] = useQueryState('age', 25)
  const [active, setActive] = useQueryState('active', false)

  return (
    <div>
      <h2>Intro</h2>
      <p>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquid architecto, atque,
        corporis debitis esse.
      </p>
      </div>

react-router-use-location-state

react hook to the browsers location query state

MIT
Latest version published 2 years ago

Package Health Score

48 / 100
Full package analysis

Popular react-router-use-location-state functions

Similar packages