New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-filter-by-url

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-filter-by-url - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

2

package.json

@@ -7,3 +7,3 @@ {

},
"version": "0.2.0",
"version": "0.2.1",
"description": "A React library to update API Url with query parameters by looking at query parameters in the address bar of browser.",

@@ -10,0 +10,0 @@ "main": "dist/cjs/index.js",

@@ -13,3 +13,3 @@ ![npm](https://img.shields.io/npm/v/react-filter-by-url)

[![Edit bold-ellis-6rg1t](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/q4szr7?file=/src/DemoList.tsx)
[![Edit bold-ellis-6rg1t](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/elegant-keller-dpjp3e?file=/src/App.tsx)

@@ -44,28 +44,5 @@ Live demo: https://react-filter-by-ulr-demo.vercel.app/list

```
yarn add react-filter-by-url react-router-dom
yarn add react-filter-by-url
```
We use `react-router-dom` under the hood, so in the root file `index.tsx`, wrap the `<app />` with `<BrowserRouter>`:
```jsx
import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App'
import reportWebVitals from './reportWebVitals'
import { BrowserRouter as Router } from 'react-router-dom'
const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
)
root.render(
<React.StrictMode>
<Router>
<App />
</Router>
</React.StrictMode>
)
```
### Implementation

@@ -118,3 +95,3 @@

Try toggling around the filters in the UI by using `handleSelectFilter` to update the URL query parameters.:
Try toggling around the filters in the UI by using `handleSelectFilter` to update the URL query parameters:

@@ -121,0 +98,0 @@ ```jsx

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc