
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
solid-ts-hooks
Advanced tools
Solid-ts-hooks Solidjs hook library, ready to use, written in Typescript.
npm i solid-ts-hooks
yarn add solid-ts-hooks
pnpm add solid-ts-hooks
createClickOutside
import { createClickOutside} from "solid-ts-hooks";
const setRef = createClickOutside(() => {
console.log("click outside");
});
return (
<div ref={setRef}>Click outside me</div>
)
createLocalStorage
import { createLocalStorage } from "solid-ts-hooks";
const [data, setData] = useLocalStorage('some-data', {})
setData({ name: "Paul" })
return (
<div>Your name is {data()?.name}</div>
)
createDarkMode
import { createDarkMode} from "solid-ts-hooks";
const { isDarkMode, enable, toggle, disable } = createDarkMode(true);
return (
<div>Your mode is {isDarkMode() ? "Dark" : "Light"}</div>
)
createIntersectingObserver
import { createIntersectingObserver} from "solid-ts-hooks";
const { setRef, isVisible } = createIntersectingObserver({});
return (
<div ref={setRef}>I am {isVisible() ? "visible" : "invisible"}</div>
)
createMap
import { createMap} from "solid-ts-hooks";
const [map, actions] = createMap<string, string>(initialValues)
const set = () => actions.set(String(Date.now()), '📦')
const setAll = () => actions.setAll(otherValues)
const reset = () => actions.reset()
const remove = () => actions.remove('hello')
return (
<div ref={setRef}>
<button onClick={set}>Add</button>
<button onClick={reset}>Reset</button>
<button onClick={setAll}>Set new data</button>
<button onClick={remove} disabled={!map.get('hello')}>
{'Remove "hello"'}
</button>
</div>
)
createMediaQuery
import { createMediaQuery } from "solid-ts-hooks";
const matches = createMediaQuery ('(min-width: 768px)')
return (
<div>{`The view port is ${matches ? 'at least' : 'less than'} 768 pixels wide`}</div>
)
createWindowScroll
import { createWindowScroll} from "solid-ts-hooks";
createWindowScroll(() => {
console.log("scroll")
})
createWindowSize
import { createWindowSize} from "solid-ts-hooks";
const { width, height} = createWindowSize()
console.log(width(), height())
FAQs
Solid-ts-hooks Solidjs hook library, ready to use, written in Typescript.
The npm package solid-ts-hooks receives a total of 1 weekly downloads. As such, solid-ts-hooks popularity was classified as not popular.
We found that solid-ts-hooks 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.