Adding a Microinteraction
Adding a microinteraction is pretty straight-forward as well.
Step 1: Add Microinteraction File#
Navigate to the /src/microinteractions/ directory and drop in your .js file or create a directory for it if the microinteraction is a little more complex.
Step 2: Add to Switch Navigator#
protocapsule uses a high-level Switch Navigator for better optimization that allows for only loading in the screens/app experience we need at the time.
This step is to include the newly added microinteraction, to the SwitchNavigator
Open up the file /src/navigation/SwitchNavigator.js
/src/navigation/SwitchNavigator.js
Step 3: Data mapping#
Finally we need to add the microinteraction to the data file so that it will display on the microinteraction tab of protocapsule.
Open up the file /src/capsule/data.js
/src/capsule/data.js
That's it, a new microinteraction has now been added to protocapsule!