
Security News
MCP Steering Committee Launches Official MCP Registry in Preview
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
react-storage-kit
Advanced tools
npm install --save react-storage-kit
or
yarn add react-storage-kit
import React, { useState } from 'react'
import { useStorageKit } from 'react-storage-kit'
// inside your function component
const storage = useStorageKit()
Return all value in Storage Kit
import React, { useState } from 'react'
import { useStorageKit } from 'react-storage-kit'
const MyComponent = () => {
const storage = useStorageKit()
const data = storage.getAll()
return (
<div>
<span>{data.fullName}</span>
</div>
)
}
export default MyComponent;
string[]
)Return multiple value in Storage Kit
import React, { useState } from 'react'
import { useStorageKit } from 'react-storage-kit'
const MyComponent = () => {
const storage = useStorageKit()
const data = storage.getMultiple(["fullName", "email", "age"])
console.log(data.fullName) // John Doe
console.log(data.phoneNumber) // undefined
return (
<div>
<span>{data.fullName}</span>
<span>{data.email}</span>
<span>{data.age}</span>
</div>
)
}
export default MyComponent;
key: string
,value: object | string | number
)Set key value StorageKit
import React, { useState } from 'react'
import { useStorageKit } from 'react-storage-kit'
const MyComponent = () => {
const storage = useStorageKit()
const handleClearAll = () => {
storage.setItem("fullName", "John Doe")
}
return (
<div>
<button onClick={handleClearAll}>Set item</button>
</div>
)
}
export default MyComponent;
key: string
)Delete a value in StorageKit
import React, { useState } from 'react'
import { useStorageKit } from 'react-storage-kit'
const MyComponent = () => {
const storage = useStorageKit()
const handleSetItem = () => {
storage.removeItem("fullName")
}
return (
<div>
<button onClick={handleDeleteItem}>Delete item</button>
</div>
)
}
export default MyComponent;
delete all values stored in StorageKit
import React, { useState } from 'react'
import { useStorageKit } from 'react-storage-kit'
const MyComponent = () => {
const storage = useStorageKit()
const handleClearAll = () => {
storage.clear()
}
return (
<div>
<button onClick={handleClearAll}>Clear All</button>
</div>
)
}
export default MyComponent;
MIT © l1ttps
FAQs
Local storage encryption Library for React Js
We found that react-storage-kit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.