cloud-native-toolkit / cloud-native-toolkit/planning

StockItemMockService misnamed/App.default missing in App.jsx after step

Open
#16 1 comment 0 reactions 0 assignees View on GitHub
bug documentation
Dominant language
No language data
Stars
4
Forks
1
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Through Inventory Micro App - Part 2. Instructions *Add a service component to get mock Stock Items*, you're asked to create a StockItemMockService class, along with configuring App.jsx and App.test.jsx to work with it.

following instructions includes a typo for App.jsx:

```js
class App extends Component {
constructor(props) {
super(props);
this.stockService = props.stockService || new MockStockService();
}
```
instead of new `StockItemMockService`

finally, following this configuration from the guide creates a `./src/index.js
Attempted import error: './App' does not contain a default export (imported as 'App').`

**To Reproduce**
Steps to reproduce the behavior:
1. Follow Inventory Micro App - Part 1, create a reactui template
2. during the service portion of the app, follow instructions
3. try to run npm start:dev

**Expected behavior**
I imagine the app should run normally with the service implemented?

**Screenshots**
Screen Shot 2019-12-19 at 12 18 35 PM

**IBM Cloud**
Select the services and tools affected

- [ ] IBM Kubernetes Service Managed Service
- [ ] Red Hat OpenShift Managed Services
- [ ] Jenkins
- [ ] Tekton
- [ ] SonarQube
- [ ] Pact
- [ ] Artifactory
- [ ] IBM Image Registry

**Desktop (please complete the following information):**
- OS: OSX Catalina
- Browser Chrome

**Additional context**
Is adding export default App, the correct way to troubleshoot this? I'm unfamiliar with React

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.