Getting Started
This section describes how to get started with React component features. To work with the React components initially, we need to index React components.
- In Order to support React Component Navigation, we need to first add the main POS route file into the resource library mapping (posRoutes.js).
- Import POS-POS REACT UI project into the workspace if it's not already imported.
- Add the routes file to Enactor Resource Mappings. (This is under Windows --> Preferences --> Resource Mapping --> React Route)
- Click "Add mapping" and give the prefix as below. Choose the workspace mapping directory too as given. Click OK.
After this, the posRoute.js file is mapped correctly and now we can index the routes. Navigate to the Resource Library. Then click "update indexes" under the drop-down when we click the vertical three dots in the top right corner on the resource library. The "Select resource types" pop-up window will show up like this.
Then make sure the React Component is selected and index it. Wait until the index is finished and you are good to go.
For Customer Workspaces
- When setting up customer workspaces, first, the relevant Customer React POS project should be imported.
- In a customer project, the routes files for resource mappings are located in the node modules folder.
- Ensure the correct path to the workspace mappings is provided as shown below, following the same steps mentioned above.