
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
@solid-primitives/page-visibility
Advanced tools
createPageVisibility
- Creates a signal with a boolean value identifying the page visibility stateusePageVisibility
- A shared-root alternative.npm install @solid-primitives/page-visibility
# or
yarn add @solid-primitives/page-visibility
createPageVisibility
Creates a signal with a boolean value identifying the page visibility state.
import { createPageVisibility } from "@solid-primitives/page-visibility";
const visible = createPageVisibility();
createEffect(() => {
visible(); // => boolean
});
usePageVisibility
usePageVisibility
is a shared root primitive. It is providing the same signal as createPageVisibility
, but the event-listener and the signal are shared between dependents, making it more optimized to use in multiple places at once.
import { usePageVisibility } from "@solid-primitives/page-visibility";
const visible = usePageVisibility();
createEffect(() => {
visible(); // => boolean
});
See CHANGELOG.md
FAQs
Primitive to track page visibility
The npm package @solid-primitives/page-visibility receives a total of 523 weekly downloads. As such, @solid-primitives/page-visibility popularity was classified as not popular.
We found that @solid-primitives/page-visibility demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers 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
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.