Socket
Book a DemoInstallSign in
Socket

ink-console

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ink-console

Render a scrollable terminal log in your ink app

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

ink-console

Render a scrollable terminal log in your ink app

Build Status Dependency Status NPM version

Demo

Installation

npm install ink-console --save

Basic Usage

import {h, render} from 'ts-ink';
import Console from 'ink-console';
import Counter from './Counter';

render(
  <div>
    <Counter />
    <br />
    <Console lines={20} />
  </div>,
);

Advanced Usage

import {h, render} from 'ts-ink';
import Console, {LogCatcher} from 'ink-console';
import Counter from './Counter';

// defining the log catcher outside the component
// lets you render the same global console.log in
// multiple separate locations
// e.g. you can preserve the log even if it is not always visible
const logCatcher = new LogCatcher();

render(
  <div>
    <Counter />
    <br />
    <Console lines={20} logCatcher={logCatcher} />
  </div>,
);

License

MIT

FAQs

Package last updated on 13 May 2018

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