Releases: cursedquail/react-qparams
Releases · cursedquail/react-qparams
A Link to the future
This release includes the new QueryLink
component, an analogue to react-router-dom's Link
component that accepts a set of queryparams!
The Irreplaceable
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