Skip to content

Releases: cursedquail/react-qparams

A Link to the future

17 Jul 18:57
Compare
Choose a tag to compare

This release includes the new QueryLink component, an analogue to react-router-dom's Link component that accepts a set of queryparams!

The Irreplaceable

17 Jul 15:45
Compare
Choose a tag to compare

This release adds support for history.replace. The API is very similar to the existing one:

import QueryParams from "react-qparams";

function RenderView(props) {
  return (
    <QueryParams>
      {query => (
        <button onClick={() => query.setQuery({ tab: "other" }, { replace: true })}>
          {query.tab || "default"}
        </button>
      )}
    </QueryParams>
  );
}

Thanks to the excellent work of @claymccullough in #4