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

@remote-ui/types

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remote-ui/types

  • 0.0.4
  • npm
  • Socket score

Version published
Weekly downloads
149K
increased by6.46%
Maintainers
1
Weekly downloads
 
Created

What is @remote-ui/types?

@remote-ui/types is a TypeScript library that provides type definitions and utilities for building remote UI components. It is designed to facilitate the creation of UI components that can be rendered in a different environment from where they are defined, such as in a web worker or an iframe.

What are @remote-ui/types's main functionalities?

Component Type Definitions

Defines a remote UI component type with specific properties. This example shows how to define a Button component with label and onClick properties.

import {RemoteComponentType} from '@remote-ui/types';

interface ButtonProps {
  label: string;
  onClick: () => void;
}

const Button: RemoteComponentType<'Button', ButtonProps> = {
  kind: 'Button',
  props: {
    label: 'Click me',
    onClick: () => alert('Button clicked!'),
  },
};

Remote Component Creation

Creates a remote UI component instance. This example demonstrates how to create a Button component instance with specific properties.

import {createRemoteComponent} from '@remote-ui/types';

const Button = createRemoteComponent<'Button', {label: string; onClick: () => void}>('Button');

const buttonInstance = Button({label: 'Click me', onClick: () => alert('Button clicked!')});

Remote Component Rendering

Renders a remote UI component instance to a target environment. This example shows how to render a Button component instance to a DOM element.

import {render} from '@remote-ui/types';

const buttonInstance = Button({label: 'Click me', onClick: () => alert('Button clicked!')});

render(buttonInstance, document.getElementById('app'));

Other packages similar to @remote-ui/types

FAQs

Package last updated on 09 Jan 2020

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