I am trying to do this :
setMyState(prevState=> {...prevState, name: e.nativeEvent.text });
While the console says src/components/addItem.js: Unexpected token
And it doesn't work :(
While using a js file .. I tried with .jsx too and same error :(.
Also I found an answer here WebStorm error: expression statement is not assignment or call
but it didn't solve my problem since when I run the app now it crashes exactly there ...