Project

General

Profile

Actions

Hacking Workbench2 » History » Revision 1

Revision 1/10 | Next »
Peter Amstutz, 02/13/2019 06:52 PM


Hacking Workbench2

The application logically begin in workbench2/src/index.tsx with a call to fetchConfig() and then (when the promise is fulfilled) the constructs the major pieces of the application architecture:

"services" interact with external resources. These classes define methods for reading and writing to a backend. Service types include a service for each the API server endpoint that workbench uses, WebDAV server, workbench2 configuration like vocabulary and file viewers, and preferences kept in the browser local store.

"store" is a Redux state container. State is divided into a groups. Each group defines a "reducer". A reducer is a function that takes (current state, action) and "reduces" it to a new state. At start, reducers are executed with an undefined state to get the initial starting state. After that, state is updated by "dispatching" an action to the state container.

The "App" component is invoked to rebuild the page (the "virtual DOM") whenever anything changes. ReactDOM merges the virtual DOM changes into the actual browser DOM.

Updated by Peter Amstutz about 5 years ago · 1 revisions