This tutorial shows how to write custom Shoutem extensions on Shoutem platform. It introduces the most important concepts. After completing it, you will have a running mobile app that uses created custom extension with components from Shoutem UI Toolkit and retrieves content from the Shoutem Cloud Storage.
Here’s a preview how completed app will look like.
As shown on the following picture, every Shoutem application is made of extensions.
Extensions represent small features that are connected to application. Application owner connects wanted extensions to application’s main navigation through Shoutem Builder and fills out the content. Shoutem prepared a bunch of open sourced extensions which you can easily customize to your needs.
On top of React and React Native, we’re using Redux, a library for simpler state management. There are several constructs in Redux explained on the next picture.
Each application has a Redux store which holds the application state. When the state changes, React automatically updates the UI components. Application can dispatch Redux actions on events (such as tapping on the button) which hold information about the triggered event. Dispatched actions will be handled by Redux reducers which specify what is the next state given the action. Once reducers handle the action, application goes to the new state and React automatically updates the UI component to reflect the new state.
Best way to understand the power of extensions, is to get your hands dirty. We’ll start with setting up your development environment.