Solve – cors problem

app.use(function(req, res, next) {
  res.header("Access-Control-Allow-Origin", "*");
  res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");

app.get('/', function(req, res, next) {
  // ....
});'/', function(req, res, next) {
 // ....

React createElement – Warning: Unknown prop `childItems` on

The following command creates an element in React.

    const el = React.createElement(
                 < an html tag or react component >, 
                 < attributes or props or {} >, 
                 < children elements or text >

When you pass a non html standard attributes in the second parameter to create html tag like div or p tag then a warning is raised of unknown prop. Simply remove the non standard attribute from the second parameter or pass empty object {}.

Ubuntu 17.10 expo and genymotion errors and solutions


Switched to a LAN URL because the tunnel appears to be down. Only devices in the same network can access the app. You can restart the project to try reconnecting.


Due to some bug you must start xde (expo development environment) before genymotion. Also i needed to run xde from root user login. (not su or sudo ).
UPDATE: The following problem of adb version fixed this problem too.



Couldn’t start project on Android: could not install *smartsocket* listener: Address already in use
ADB server didn’t ACK
* failed to start daemon *
error: cannot connect to daemon


the adb version on your system is different from the adb version on the android sdk platform-tools

1. check sys adb version

# adb version
Android Debug Bridge version 1.0.39

2. check sdk adb version

# cd /root/Android/Sdk/platform-tools
# ./adb version
Android Debug Bridge version 1.0.32

3. copy
# rm /usr/bin/adb
# sudo cp /root/Android/Sdk/platform-tools/adb /usr/bin/adb


Error: EACCES: permission denied, open ‘/tmp/haste-map-react-native-packager-1-8963e41d25a58e25717f5939e5144fc2

Solution: sudo rm /tmp/haste-map-react-native-packager-1-8963e41d25a58e25717f5939e5144fc2

The development server returned response error code: 500

For me this error was resolved running yarn in the project folder. The cause may have been due to the fact that I’d switched branches and some of the packages were not installed.

The state object

The state object contains the main data object of the application. Anything that changes in the state object will re-render the component.

The related method to set a specific key in the state is setState. The set state could be called after componentDidMount is called.


    constructor(props) {
      this.state = { products: [...] };

    componentDidMount() {