Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@slashid/jump-page

Package Overview
Dependencies
Maintainers
10
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@slashid/jump-page

WIP jump page implementation for the SDK. SSG + client side rendering.

  • 0.0.8-package.8
  • npm
  • Socket score

Version published
Weekly downloads
491
increased by25.9%
Maintainers
10
Weekly downloads
 
Created
Source

/id - SDK Jump page

WIP jump page implementation for the SDK. SSG + client side rendering.

Running the app via CLI

This package comes with CLI support so you can run it locally:

npm install -g @slashid/jump-page

CLI docs

Usage: sid-jump-cli serve [options]

Start the development server

Options:
  -p, --port <number>   Port to use for the development server (default: 4321)
  -a, --api-url <char>  SlashID API URL (default: "https://api.slashid.com")
  -s, --sdk-url <char>  SlashID SDK URL (default: "https://cdn.slashid.com/sdk.html")
  -h, --help            display help for command

Astro gotchas

React hydration

Astro renders a static site by default, meaning the even when using React components they won't hydrate out of the box - it is required to explicitly tell Astro which components should be hydrated by creating an island.

Another gotcha is that when rendering multiple React components from an Astro component, it is not enough to create an island for the parent component, but for each of the children as well. Example:

// Page.astro
---
import { Parent, Child } from './components';
---

<Parent client:load>
    <Child client:load />
</Parent>

Notice how the Child component also needs the client:load attribute. Otherwise it would only be rendered when generating the site.

To prevent issues like these, encapsulate the whole client side app in a single parent component and create an island for it.

// app.tsx
import { Parent, Child } from "./components";

export function App() {
  return (
    <Parent>
      <Child client:load />
    </Parent>
  );
}

// Page.astro
---
import { App } from './app';
---

<App client:load />

FAQs

Package last updated on 27 Mar 2024

Did you know?

Socket

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.

Install

Related posts

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