Technology showcase of React and related tools to build modern web applications.
WORK IN PROGRESS
The Browserslist file is used to define supported browsers.
As for Internet Explorer™, we only care about the officially supported (latest) version for recent Windows platforms, and so should you.
Our webpack CSS loader configuration is minimal on purpose, using the standard css-loader
with
CSS Modules enabled and custom cssnano
options for production builds.
Each prototype is a separate React-based web application built with webpack.
-
pure React application
-
state centralized in top-level
<App>
component
Vanilla React App plus:
-
Redux with react-redux bindings for predictable state management
-
Reselect for efficient computation of derived data
React App with Redux plus:
-
Redux-Saga for handling asynchronous operations (like HTTP requests) and side effects (like browser
localStorage
access) -
tcomb for API data type validation
-
install nvm and run
nvm install v6.y.z
or install Node.js v6 (LTS) manually on your platform -
install Yarn (latest stable)
-
run
yarn install
to download and link project’s dependencies into the localnode_modules
directory -
start webpack dev-server via
yarn run start:dev
and JSON API server viayarn run start:api
-
open the prototype page in your web browser and start hacking!
With dev-server, all project assets are
processed in-memory (no dist
directory).
dev-server watches the filesystem and recompiles project assets on change, regenerating JS chunks as needed. Once recompiled, application’s HTML page is automatically reloaded (this is done by injecting a script that opens WebSocket connection to dev-server).
There are several types of tests included in this project:
-
regular JS unit test: utils.test.js
-
React component test: NoteFilter.test.js
Coming up next: Redux reducer test, Saga test, async service test (like remote.js
)
Build project for production. Outputs are placed in dist
directory. Performs code linting
and runs unit tests before doing the actual build.
Build project for development (without optimizations). Same output location as with build
script. No code linting or unit tests, just the build itself.
Start webpack dev-server, watching the filesystem and recompiling project assets on change.
Run unit tests. Avoids side effects such as automatically creating snapshot files if missing. Suitable for execution in CI environment.
Run unit tests and automatically create/update snapshot files if they are missing/conflicting. Use this only when snapshot files need to be created/updated.