react
, react-dom
)redux
)
Redux is a state container that integrates well with React
redux-saga
For the most part, Virtool client source code is organized by feature. Most feature folders will have the following files or directories:
components
directoryAll components associated with the feature. May contain additional nested directories. |
reducers.js
moduleReducers and possibly some initial state values or helper functions.
selectors.js
moduleSelector functions for deriving values from the state object.
actions.js
moduleRedux action creators for the feature. |
api.js
Functions for making and handling requests to the Virtool JSON API. Uses superagent
as HTTP client library.
sagas.js
Saga code for the feature. Contains watch setup for handling actions (eg. watchSamples
) and defines generator functions for handling asynchronous activity. Most of the saga code is for dealing with API requests.
utils.js
Miscellaneous utility functions for the feature.
app
moduleContains submodules related to app initializiation and whole-application functionality.
base
moduleCommon base components for reuse in user interface.
Webpack entry point.
nonce.js
Sets a __webpack_nonce__
value based on a value passed in from the server via index.html.
utils
moduleContains reusable utility functions for the following: