zulip-mobile uses Redux for state management and data flow. Please read the Redux docs for more information on the Redux architecture and terminology (such as actions, reducers, and stores).
See our React/Redux architecture doc for a more detailed explanation as applied to our app.
At a high-level, global app state should be immutable and is stored in centralized place. Modifying state requires new copies of each data structure.
We use selectors to extract (or select) data from Redux Stores. Learn more about the concept of selectors We might use Reselect for memoized selectors, when/if a need for more performance arises.
/node_modules
- dependencies installed byyarn
from NPM/android
- auto-generated by React Native/ios
- auto-generated by React Native/docs
- developer documentation/src
- Javascript source code
In general most of the work will be inside of the /src
directory. The only
reason to touch the /ios
or /android
directories would be to add native
modules (which we aren't using at the moment).
package.json
- specifiesyarn
/ NPM dependencies and scripts for the project.babelrc
- config file for Babel transpiler (ES6 -> ES5).eslintrc
- config file for linting rules (we're using Airbnb rules).flowconfig
- config file for Flow static type checker (unused)index.js
- entry point for the app
The source directory is broken up into subdirectories corresponding to components of the app:
account
- login, logout, and user accountapi
- clients for the Zulip server APIcommon
- common components for multiple reuse (buttons, inputs, etc.)compose
- composing messagesmessage
- messages and groups of related messagesnav
- navigationstreams
- stream of messagesusers
- user display, search and selection
ZulipMobile.js
contains the top-level React component for the app and
boot/reducers.js
contains the top-level reducer.