react redux Parsing error: Unexpected character ''
up vote
0
down vote
favorite
Why this error appear?
package.json
"name": "react-shopping",
"version": "0.1.0",
"private": true,
"dependencies":
"@babel/core": "7.1.0",
"@svgr/webpack": "2.4.1",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "9.0.0",
"babel-jest": "23.6.0",
"babel-loader": "8.0.4",
"babel-plugin-named-asset-import": "^0.2.3",
"babel-preset-react-app": "^6.1.0",
"bfj": "6.1.1",
"case-sensitive-paths-webpack-plugin": "2.1.2",
"chalk": "2.4.1",
"css-loader": "1.0.0",
"dotenv": "6.0.0",
"dotenv-expand": "4.2.0",
"eslint": "5.6.0",
"eslint-config-react-app": "^3.0.5",
"eslint-loader": "2.1.1",
"eslint-plugin-flowtype": "2.50.1",
"eslint-plugin-import": "2.14.0",
"eslint-plugin-jsx-a11y": "6.1.2",
"eslint-plugin-react": "7.11.1",
"file-loader": "2.0.0",
"fork-ts-checker-webpack-plugin-alt": "0.4.14",
"fs-extra": "7.0.0",
"html-webpack-plugin": "4.0.0-alpha.2",
"identity-obj-proxy": "3.0.0",
"jest": "23.6.0",
"jest-pnp-resolver": "1.0.1",
"jest-resolve": "23.6.0",
"mini-css-extract-plugin": "0.4.3",
"optimize-css-assets-webpack-plugin": "5.0.1",
"pnp-webpack-plugin": "1.1.0",
"postcss-flexbugs-fixes": "4.1.0",
"postcss-loader": "3.0.0",
"postcss-preset-env": "6.0.6",
"postcss-safe-parser": "4.0.1",
"react": "^16.6.1",
"react-app-polyfill": "^0.1.3",
"react-dev-utils": "^6.1.1",
"react-dom": "^16.6.1",
"react-redux": "^5.1.1",
"redux": "^4.0.1",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.3.0",
"resolve": "1.8.1",
"sass-loader": "7.1.0",
"style-loader": "0.23.0",
"terser-webpack-plugin": "1.1.0",
"url-loader": "1.1.1",
"webpack": "4.19.1",
"webpack-dev-server": "3.1.9",
"webpack-manifest-plugin": "2.0.4",
"workbox-webpack-plugin": "3.6.3"
,
"scripts":
"start": "node scripts/start.js",
"build": "node scripts/build.js",
"test": "node scripts/test.js"
,
"eslintConfig":
"extends": "react-app"
,
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"jest": jsx,
"babel":
"presets": [
"react-app"
]
store.js
import createStore from 'redux';
function todos(state = , action)
switch (action.type)
case 'ADD_TODO':
return state.concat([action.text]);
default:
return state;
const store = createStore(todos, ['Use Redux']);
store.dispatch(
type: 'ADD_TODO',
text: 'Read the docs'
);
console.log(store.getState());
App.js
import React, Component from 'react';
import './store';
class App extends Component
render()
return (
<div className="App">
<h1>asdas</h1>
</div>
);
export default App;
reactjs redux react-redux
add a comment |
up vote
0
down vote
favorite
Why this error appear?
package.json
"name": "react-shopping",
"version": "0.1.0",
"private": true,
"dependencies":
"@babel/core": "7.1.0",
"@svgr/webpack": "2.4.1",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "9.0.0",
"babel-jest": "23.6.0",
"babel-loader": "8.0.4",
"babel-plugin-named-asset-import": "^0.2.3",
"babel-preset-react-app": "^6.1.0",
"bfj": "6.1.1",
"case-sensitive-paths-webpack-plugin": "2.1.2",
"chalk": "2.4.1",
"css-loader": "1.0.0",
"dotenv": "6.0.0",
"dotenv-expand": "4.2.0",
"eslint": "5.6.0",
"eslint-config-react-app": "^3.0.5",
"eslint-loader": "2.1.1",
"eslint-plugin-flowtype": "2.50.1",
"eslint-plugin-import": "2.14.0",
"eslint-plugin-jsx-a11y": "6.1.2",
"eslint-plugin-react": "7.11.1",
"file-loader": "2.0.0",
"fork-ts-checker-webpack-plugin-alt": "0.4.14",
"fs-extra": "7.0.0",
"html-webpack-plugin": "4.0.0-alpha.2",
"identity-obj-proxy": "3.0.0",
"jest": "23.6.0",
"jest-pnp-resolver": "1.0.1",
"jest-resolve": "23.6.0",
"mini-css-extract-plugin": "0.4.3",
"optimize-css-assets-webpack-plugin": "5.0.1",
"pnp-webpack-plugin": "1.1.0",
"postcss-flexbugs-fixes": "4.1.0",
"postcss-loader": "3.0.0",
"postcss-preset-env": "6.0.6",
"postcss-safe-parser": "4.0.1",
"react": "^16.6.1",
"react-app-polyfill": "^0.1.3",
"react-dev-utils": "^6.1.1",
"react-dom": "^16.6.1",
"react-redux": "^5.1.1",
"redux": "^4.0.1",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.3.0",
"resolve": "1.8.1",
"sass-loader": "7.1.0",
"style-loader": "0.23.0",
"terser-webpack-plugin": "1.1.0",
"url-loader": "1.1.1",
"webpack": "4.19.1",
"webpack-dev-server": "3.1.9",
"webpack-manifest-plugin": "2.0.4",
"workbox-webpack-plugin": "3.6.3"
,
"scripts":
"start": "node scripts/start.js",
"build": "node scripts/build.js",
"test": "node scripts/test.js"
,
"eslintConfig":
"extends": "react-app"
,
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"jest": jsx,
"babel":
"presets": [
"react-app"
]
store.js
import createStore from 'redux';
function todos(state = , action)
switch (action.type)
case 'ADD_TODO':
return state.concat([action.text]);
default:
return state;
const store = createStore(todos, ['Use Redux']);
store.dispatch(
type: 'ADD_TODO',
text: 'Read the docs'
);
console.log(store.getState());
App.js
import React, Component from 'react';
import './store';
class App extends Component
render()
return (
<div className="App">
<h1>asdas</h1>
</div>
);
export default App;
reactjs redux react-redux
Get rid of [‘Use Redux’] in your create store...
– SakoBu
Nov 11 at 6:12
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Why this error appear?
package.json
"name": "react-shopping",
"version": "0.1.0",
"private": true,
"dependencies":
"@babel/core": "7.1.0",
"@svgr/webpack": "2.4.1",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "9.0.0",
"babel-jest": "23.6.0",
"babel-loader": "8.0.4",
"babel-plugin-named-asset-import": "^0.2.3",
"babel-preset-react-app": "^6.1.0",
"bfj": "6.1.1",
"case-sensitive-paths-webpack-plugin": "2.1.2",
"chalk": "2.4.1",
"css-loader": "1.0.0",
"dotenv": "6.0.0",
"dotenv-expand": "4.2.0",
"eslint": "5.6.0",
"eslint-config-react-app": "^3.0.5",
"eslint-loader": "2.1.1",
"eslint-plugin-flowtype": "2.50.1",
"eslint-plugin-import": "2.14.0",
"eslint-plugin-jsx-a11y": "6.1.2",
"eslint-plugin-react": "7.11.1",
"file-loader": "2.0.0",
"fork-ts-checker-webpack-plugin-alt": "0.4.14",
"fs-extra": "7.0.0",
"html-webpack-plugin": "4.0.0-alpha.2",
"identity-obj-proxy": "3.0.0",
"jest": "23.6.0",
"jest-pnp-resolver": "1.0.1",
"jest-resolve": "23.6.0",
"mini-css-extract-plugin": "0.4.3",
"optimize-css-assets-webpack-plugin": "5.0.1",
"pnp-webpack-plugin": "1.1.0",
"postcss-flexbugs-fixes": "4.1.0",
"postcss-loader": "3.0.0",
"postcss-preset-env": "6.0.6",
"postcss-safe-parser": "4.0.1",
"react": "^16.6.1",
"react-app-polyfill": "^0.1.3",
"react-dev-utils": "^6.1.1",
"react-dom": "^16.6.1",
"react-redux": "^5.1.1",
"redux": "^4.0.1",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.3.0",
"resolve": "1.8.1",
"sass-loader": "7.1.0",
"style-loader": "0.23.0",
"terser-webpack-plugin": "1.1.0",
"url-loader": "1.1.1",
"webpack": "4.19.1",
"webpack-dev-server": "3.1.9",
"webpack-manifest-plugin": "2.0.4",
"workbox-webpack-plugin": "3.6.3"
,
"scripts":
"start": "node scripts/start.js",
"build": "node scripts/build.js",
"test": "node scripts/test.js"
,
"eslintConfig":
"extends": "react-app"
,
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"jest": jsx,
"babel":
"presets": [
"react-app"
]
store.js
import createStore from 'redux';
function todos(state = , action)
switch (action.type)
case 'ADD_TODO':
return state.concat([action.text]);
default:
return state;
const store = createStore(todos, ['Use Redux']);
store.dispatch(
type: 'ADD_TODO',
text: 'Read the docs'
);
console.log(store.getState());
App.js
import React, Component from 'react';
import './store';
class App extends Component
render()
return (
<div className="App">
<h1>asdas</h1>
</div>
);
export default App;
reactjs redux react-redux
Why this error appear?
package.json
"name": "react-shopping",
"version": "0.1.0",
"private": true,
"dependencies":
"@babel/core": "7.1.0",
"@svgr/webpack": "2.4.1",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "9.0.0",
"babel-jest": "23.6.0",
"babel-loader": "8.0.4",
"babel-plugin-named-asset-import": "^0.2.3",
"babel-preset-react-app": "^6.1.0",
"bfj": "6.1.1",
"case-sensitive-paths-webpack-plugin": "2.1.2",
"chalk": "2.4.1",
"css-loader": "1.0.0",
"dotenv": "6.0.0",
"dotenv-expand": "4.2.0",
"eslint": "5.6.0",
"eslint-config-react-app": "^3.0.5",
"eslint-loader": "2.1.1",
"eslint-plugin-flowtype": "2.50.1",
"eslint-plugin-import": "2.14.0",
"eslint-plugin-jsx-a11y": "6.1.2",
"eslint-plugin-react": "7.11.1",
"file-loader": "2.0.0",
"fork-ts-checker-webpack-plugin-alt": "0.4.14",
"fs-extra": "7.0.0",
"html-webpack-plugin": "4.0.0-alpha.2",
"identity-obj-proxy": "3.0.0",
"jest": "23.6.0",
"jest-pnp-resolver": "1.0.1",
"jest-resolve": "23.6.0",
"mini-css-extract-plugin": "0.4.3",
"optimize-css-assets-webpack-plugin": "5.0.1",
"pnp-webpack-plugin": "1.1.0",
"postcss-flexbugs-fixes": "4.1.0",
"postcss-loader": "3.0.0",
"postcss-preset-env": "6.0.6",
"postcss-safe-parser": "4.0.1",
"react": "^16.6.1",
"react-app-polyfill": "^0.1.3",
"react-dev-utils": "^6.1.1",
"react-dom": "^16.6.1",
"react-redux": "^5.1.1",
"redux": "^4.0.1",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.3.0",
"resolve": "1.8.1",
"sass-loader": "7.1.0",
"style-loader": "0.23.0",
"terser-webpack-plugin": "1.1.0",
"url-loader": "1.1.1",
"webpack": "4.19.1",
"webpack-dev-server": "3.1.9",
"webpack-manifest-plugin": "2.0.4",
"workbox-webpack-plugin": "3.6.3"
,
"scripts":
"start": "node scripts/start.js",
"build": "node scripts/build.js",
"test": "node scripts/test.js"
,
"eslintConfig":
"extends": "react-app"
,
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"jest": jsx,
"babel":
"presets": [
"react-app"
]
store.js
import createStore from 'redux';
function todos(state = , action)
switch (action.type)
case 'ADD_TODO':
return state.concat([action.text]);
default:
return state;
const store = createStore(todos, ['Use Redux']);
store.dispatch(
type: 'ADD_TODO',
text: 'Read the docs'
);
console.log(store.getState());
App.js
import React, Component from 'react';
import './store';
class App extends Component
render()
return (
<div className="App">
<h1>asdas</h1>
</div>
);
export default App;
reactjs redux react-redux
reactjs redux react-redux
edited Nov 11 at 4:34
Nguyễn Thanh Tú
4,5392827
4,5392827
asked Nov 11 at 4:26
Стас Рябцев
72112
72112
Get rid of [‘Use Redux’] in your create store...
– SakoBu
Nov 11 at 6:12
add a comment |
Get rid of [‘Use Redux’] in your create store...
– SakoBu
Nov 11 at 6:12
Get rid of [‘Use Redux’] in your create store...
– SakoBu
Nov 11 at 6:12
Get rid of [‘Use Redux’] in your create store...
– SakoBu
Nov 11 at 6:12
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
Seems to me like a lint bug. When I removed two blank lines, I didn't get any errors:
import createStore from 'redux';
function todos(state = , action)
switch (action.type)
case 'ADD_TODO':
return state.concat([action.text]);
default:
return state;
const store = createStore(todos, ['Use Redux']);
store.dispatch(
type: 'ADD_TODO',
text: 'Read the docs'
);
console.log(store.getState());
omg, thanks a lot !
– Стас Рябцев
Nov 11 at 6:24
oml :) (Oh my Lint)
– Yossi
Nov 11 at 6:27
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Seems to me like a lint bug. When I removed two blank lines, I didn't get any errors:
import createStore from 'redux';
function todos(state = , action)
switch (action.type)
case 'ADD_TODO':
return state.concat([action.text]);
default:
return state;
const store = createStore(todos, ['Use Redux']);
store.dispatch(
type: 'ADD_TODO',
text: 'Read the docs'
);
console.log(store.getState());
omg, thanks a lot !
– Стас Рябцев
Nov 11 at 6:24
oml :) (Oh my Lint)
– Yossi
Nov 11 at 6:27
add a comment |
up vote
1
down vote
accepted
Seems to me like a lint bug. When I removed two blank lines, I didn't get any errors:
import createStore from 'redux';
function todos(state = , action)
switch (action.type)
case 'ADD_TODO':
return state.concat([action.text]);
default:
return state;
const store = createStore(todos, ['Use Redux']);
store.dispatch(
type: 'ADD_TODO',
text: 'Read the docs'
);
console.log(store.getState());
omg, thanks a lot !
– Стас Рябцев
Nov 11 at 6:24
oml :) (Oh my Lint)
– Yossi
Nov 11 at 6:27
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Seems to me like a lint bug. When I removed two blank lines, I didn't get any errors:
import createStore from 'redux';
function todos(state = , action)
switch (action.type)
case 'ADD_TODO':
return state.concat([action.text]);
default:
return state;
const store = createStore(todos, ['Use Redux']);
store.dispatch(
type: 'ADD_TODO',
text: 'Read the docs'
);
console.log(store.getState());
Seems to me like a lint bug. When I removed two blank lines, I didn't get any errors:
import createStore from 'redux';
function todos(state = , action)
switch (action.type)
case 'ADD_TODO':
return state.concat([action.text]);
default:
return state;
const store = createStore(todos, ['Use Redux']);
store.dispatch(
type: 'ADD_TODO',
text: 'Read the docs'
);
console.log(store.getState());
answered Nov 11 at 6:20
Yossi
1,5092619
1,5092619
omg, thanks a lot !
– Стас Рябцев
Nov 11 at 6:24
oml :) (Oh my Lint)
– Yossi
Nov 11 at 6:27
add a comment |
omg, thanks a lot !
– Стас Рябцев
Nov 11 at 6:24
oml :) (Oh my Lint)
– Yossi
Nov 11 at 6:27
omg, thanks a lot !
– Стас Рябцев
Nov 11 at 6:24
omg, thanks a lot !
– Стас Рябцев
Nov 11 at 6:24
oml :) (Oh my Lint)
– Yossi
Nov 11 at 6:27
oml :) (Oh my Lint)
– Yossi
Nov 11 at 6:27
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53245831%2freact-redux-parsing-error-unexpected-character%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Get rid of [‘Use Redux’] in your create store...
– SakoBu
Nov 11 at 6:12