Copyright (C) 2016-2018 The Open Library Foundation
This software is distributed under the terms of the Apache License, Version 2.0. See the file "LICENSE" for more information.
Stripes Connect provides essentially one service: the ability to
upgrade a regular React component into a Connected Component. This is
done by importing the connect()
method from stripes-connect
,
defining a data manifest, and exporting not the React component itself
but the result of wrapping it in a call to connect()
:
import { Component } from 'react';
import { connect } from 'stripes-connect';
class MyStripesComponent extends Component {
static manifest = { 'resourceName': { params: values } };
// ...
}
export default connect(MyStripesComponent, 'moduleName');
- The API and data manifest are explained in detail in The Stripes Connect API.
- A complete worked example of a connected component for editing patrons is explained in A component example: the PatronEdit component.
- New features and migration paths for modules to opt-in to them are explained in Migration Paths
See stripes-core.
See project STRPCONN at the FOLIO issue tracker.
Other FOLIO Developer documentation is at dev.folio.org