@wirelineio/appkit
v0.3.0
Published
Wireline pads and applications SDK.
Downloads
2
Keywords
Readme
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 } }
whereid
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 ofcontent: {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.