Full Stack MERN Project - Build and Deploy an App | React + Redux, Node, Express, MongoDB [Part 1/2]
Why Stack Overflow recommends it
Stack Overflow users link it as the tutorial they are following when they ask about errors in their own MERN code, and occasionally recommend it as a Redux or React starter.
Recommended by 4 people across 4 different months, 2020 to 2022.
What it is
Part 1 of a two-part JavaScript Mastery tutorial that builds a full-stack MERN app called "Memories", a simple social posting app. It covers backend setup with Node, Express and MongoDB, then the React and Redux frontend including Material UI forms and posts.
What people said
Recommends lala · 2020-11 · Stack Overflow · on “How to export a useState input value to another React page”
You can manage your state well with context or redux . Basically it allows you to have your state anywhere you like. Here are the documentation of both approach:- Context API [LINK] Redux [LINK] And here are some video guides you can follow:- React Context API [LINK] React Redux [this video]
Recommends Mike · 2021-08 · Stack Overflow · on “change layout without redirecting to another html document”
Based on your decription, I would recommend React (to achieve higher SEO: Nextjs). Try to gg some source or video about it. Here is one of my fav: Build a React memory app [this video] Landing Page using Nextjs [LINK] FYI: Ajax is a asynchronously method for your website communicate with server. And you can think JSON of a lightweight data, that you can receive(GET), send(POST),.. from/to server.
Recommends vin cam · 2022-05 · Stack Overflow · on “MongoDB/React Error: listen EADDRINUSE: address already in use :::5000”
I am following this MERN tutorial: [this video] Around @18:00 is where I am having problems. After some research I think some of the code in the video is outdated and I am doing my best to get this to work! This is my current error: Error: listen EADDRINUSE: address already in use :::5000 import express from 'express'; import bodyParser from 'body-parser'; import mongoose from 'mongoose'; import cors from 'cors'; import postRoutes from './routes/posts.js'; const app = express(); app.use('/posts', postRoutes); app.use(bodyParser.json( { limit: "30mb", extended: true})); app.use(bodyParser.urlencoded( { limit: "30mb", extended: true})); app.use(cors()); const CONNECTION_URL = 'mongodb+srv://test:te
Recommends thgtveh7031 · 2022-12 · Stack Overflow · on “Not understand the code of action and dispatch in this Redux tutorial”
I'm watching a tutorial about MERN stack project of a youtuber. And I'm watching him coding the Redux part of the project. There is some of his code which I don't understand This is his Redux action code to retrieve data from api [LINK] From what I understand, this is an action and it supposed to return action object {type, payload}. I don't understand why he give an dispatch argument in the curly braces (line 4) and dispatch the action object (line 8) This is his App.js file [LINK] And in his App.js I dont see him pass any argument into getPosts() (line 16) I try to create action using redux toolkit like this export const getPosts = createAction('FETCH_ALL', async () => { try { const { data
Cites Arslan Shahid · 2021-01 · Stack Overflow · on “Error While using Material UI within React”
I was following a youtube tutorial about building an app in React JS. [this video] In that tutorial I created an App as described in it [time stamp: [this video] ]. import React from 'react'; import {Container, AppBar, Typography, Grid, Grow} from '@material-ui/core'; import memories from './images/memories.png' const App = ()=>{ return ( <Container maxidth='lg'> <AppBar position='static' color="inherit"> <Typography variant='h2' align="center">Memories</Typography> <img src={memories} alt='memories' height='60' /> </AppBar> </Container> ); } export default App; But I am getting this error, Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen
Cites slowbias · 2021-01 · Stack Overflow · on “TextField form not appearing inside React App”
Following along with this tutorial : [this video] at 57 minutes in, while attempting to complete the "Form" section, I have correctly replicated the code, but my form does not appear in my app. here is what it should look like : correct display [LINK] and here is what I'm getting: Form not appearing [LINK] I imagine this is a simple organizational gaffe since I am not throwing any errors in the console. I am using the "material-ui/core" React framework. At the top of my file on Import, TextField is shown as greyed or unused despite being in my file. below is my form.js file: import React, { useState } from "react"; import { TextField, Button, Typography, Paper } from "@material-ui/core"; import F
Cites Shane · 2021-05 · Stack Overflow · on “Receiving the message: Cannot GET / error while using NodeJS and React”
I know similar questions have been answered multiple times over the years and I have scoured through just about all of them and can't seem to figure out what my issue is. I am getting the Cannot GET / error with NodeJS when opening the localhost:5000 in browser. When inspecting I can see it says "Failed to load resource: the server responded with a status of 404 (Not Found)", which I think may be related to my controllers file. Note: I am trying to code based off of this tutorial: [this video] The "This works" message previously showed up for me and the array symbol still shows up. It is the JSX structure part where I first run into this issue (begins at 28:50). I feel I have done exactly as the
Cites pedrofromperu · 2021-08 · Stack Overflow · on “How to use the MERN stack ( without errors )?”
I'm learning the MERN stack. I'm following this tutorial : [this video] Basically when I run "npm start" it wont read my index.js. The tutorial Im following is fresh and highly rated.. but Im stuck at the very early of the tutorial, and the error message is not really implicit. Stuck after minute 15. I would be grateful for some infos/guidance on this topic. My steps till I started : mkdir server cd server npm init -y npm install body-parser cors express mongoose nodemon code package.json { "name": "server", "version": "1.0.0", "description": "", "main": "index.js", "type": "module", "scripts": { "start": "nodemon index.js" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { "bod
Cites priyanshu · 2021-10 · Stack Overflow · on “how to solve "Actions must be plain objects. Use custom middleware for async actions."”
I have redux store like this index.js import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import { createStore, applyMiddleware, compose } from 'redux'; import thunk from 'redux-thunk'; import { reducers } from './reducers'; import App from './App'; import './index.css'; const store = createStore(reducers, applyMiddleware(thunk)) ReactDOM.render( <Provider store={store}> <App /> </Provider>, document.getElementById('root'), ); form.js import React, { useState} from 'react'; import { TextField, Button, Typography, Paper } from '@material-ui/core'; import { useDispatch } from 'react-redux'; import FileBase from 'react-file-base64'; import useSty
Cites ww123w · 2021-12 · Stack Overflow · on “why is localhost:5000 denied in Express.js?”
I am following a youtube tutorial: [this video] . In 18:25. "THIS WORK!" should be printed out on the localhost:5000 page, but I am not able to see it. Anyone can help? [LINK] [LINK] [LINK]