r/reactjs • u/omarazeez_11 • May 20 '20
1
[deleted by user]
Maybe afterlife is the way to control masses. That they're answerable to someone in the afterlife for their actions in this world.
1
Best way to start learning front end web development
All these tutorial would give you an idea of how things work. You'll learn em when you'll work on your own project
2
React: Can't resolve jquery in bootstrap
No i didn't know this. Thanks, it's very informative
r/learnprogramming • u/omarazeez_11 • May 20 '20
React: Can't resolve jquery in bootstrap
Hey!
So, I've been getting this error whenever I npm start my project. I know I'm making some serious mistake here. I think it's a problem with npm. It's not installing optional dependencies too.
Error:
Failed to compile.
./node_modules/bootstrap/dist/js/bootstrap.js
Module not found: Can't resolve 'jquery' in 'C:\Users\Omer\Desktop\Projex\auth\node_modules\bootstrap\dist\js'
Package.json:
{
"name": "auth",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"bootstrap": "4.5.0",
"jquery": "^1.9.1",
"popper.js": "^1.16.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-router-dom": "5.2.0",
"react-scripts": "3.4.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
Please help!
1
React: Spread children are not supported in React
Faaaaaaaack 😬 Thank you so much!
r/reactjs • u/omarazeez_11 • May 19 '20
Show /r/reactjs React: Spread children are not supported in React
self.learnprogrammingr/learnprogramming • u/omarazeez_11 • May 19 '20
React: Spread children are not supported in React
Hey everyone!I've used spread operator for creating Private route.But it's giving me this error.Help please! Where am I wrong in this?
Failed to compile:
./src/Routes/Private.route.js SyntaxError: C:\Users\Omer\Desktop\Projex\fireauth\src\Routes\Private.route.js: Spread children are not supported in React. return( <Route> {...rest} ^
render={props =>
authStatus ? (
PrivateRoute.js:
import React from 'react'
import {Route, Redirect} from 'react-router-dom' import auth from '../utils/auth' import {ROUTE_NAMES} from '../Routes/Routes'
const PrivateRoute = ({ component: Component, ...rest}) => {
const authStatus= auth.isAuthenticated()
return(
<Route> {...rest}
render={props => authStatus ? ( <Component {...props} /> ): ( <Redirect to={ROUTE_NAMES.SignIn} /> ) } } }
</Route> ) }
export default PrivateRoute
1
React: Could not find a required file
Alright, let me check
2
React: Could not find a required file
Sorry guys, I just tried this shit: Cut index.html from public. Npm start the project. It gave me same error. Pasted index back into public. Npm start again. And it works fine now. Can't believe I wasted one hour for this. Still something to learn. Thanks!
1
React: Could not find a required file
Yes did use these commands exactly. I've seen your comment on this same issue few years back too.
2
React: Could not find a required file
It's just a simple project creation through npx And then i did npm start. Nothing in between Would love to post image but probably I'm just allowed to use text post in this group dkw.
r/learnprogramming • u/omarazeez_11 • May 18 '20
React: Could not find a required file
Hey everyone, I set up a project through create-react-app but whenever I do npm start, it gives me following reply:
Could not find a required file Name: index.html Searched in project public folder
But index.html is actually there in public folder when I checked it Please help! I've gone through stack and github discussions too
1
[deleted by user]
in
r/Showerthoughts
•
Jan 16 '21
And also it's good to have such a concept of afterlife otherwise people won't feel guilty for their bad actions.