@wirelineio/appkit

v0.3.0
Wireline pads and applications SDK.

appkit

SDK for the development of Web and mobile applications and pads.

withLogView

import { withLogView } from '@wirelineio/appkit';

withLogView({ view, options })(Component);

withLogView HOC provides access to the underlying view. It retrieves item data and subscribes for changes and updates based on the supplied variables.

  • view: {String} The view name. Required.
  • options: {Function(props) => ({ variables: { id } })} Map props or external varibles to return an object with the form of { variables: { id } } where id is the desired itemId. Required.

The Component receives then a property view with the following properties:

  • itemId: {String} The item ID.
  • title: {String} Title.
  • type: {String} The item type.
  • appendChange: {Function(Any)} Function to append a change in the log.
  • log: {Any[]} Array of
  • content: {String} Flat string of changes.
  • update: {Function({title, type})} Updater function for title and type.
  • archive: {Function} Archive this item.
  • unarchive: {Function} Unarchive this item.
npm i @wirelineio/appkit

Metadata

  • GPL-3.0
  • Whatever
  • Unknown
  • released 11/22/2019

Downloads