This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect, useState } from "react"; | |
const TestForm = ({ handleSubmit }) => { | |
const [formPostTitle, setFormPostTitle] = useState(""); | |
const [formPostBody, setFormPostBody] = useState(""); | |
useEffect(() => { | |
function cleanUp() { | |
console.log("TestForm:useEffect cleanUp fn. invoked"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
margin: 0; | |
box-sizing: border-box; | |
} | |
#root { | |
display: flex; | |
flex-direction: column; | |
justify-content: center; | |
align-items: center; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "./App.css"; | |
import { useEffect, useState } from "react"; | |
const useGetData = (dummyDataURL) => { | |
const [data, setData] = useState([]); | |
useEffect(() => { | |
const fetchData = (url) => { | |
console.log("useGetData: useEffect: Just before calling setData()"); | |
setData(["AE1", "AE2", "AE3", "AE4", "AE5"]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "./App.css"; | |
import { useEffect, useState } from "react"; | |
import Home from "./Home"; | |
// lines snipped | |
import useAxiosGet from "./hooks/useAxiosGet"; | |
function App() { | |
const [posts, setPosts] = useState([]); | |
const [arePostsLoading, setArePostsLoading] = useState(true); | |
const [searchPosts, setSearchPosts] = useState(""); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//lines snipped | |
function App() { | |
const [posts, setPosts] = useState([]); | |
const [arePostsLoading, setArePostsLoading] = useState(true); | |
const [searchPosts, setSearchPosts] = useState(""); | |
const { | |
data, | |
isLoading: isDataLoading, | |
axiosGetError, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Document</title> | |
<script src="https://cdn.jsdelivr.net/npm/renderjson@1.4.0/renderjson.min.js"></script> | |
<script | |
src="https://cdnjs.cloudflare.com/ajax/libs/axios/1.6.7/axios.min.js" | |
integrity="sha512-NQfB/bDaB8kaSXF8E77JjhHG5PM6XVRxvHzkZiwl3ddWCEPBa23T76MuWSwAJdMGJnmQqM0VeY9kFszsrBEFrQ==" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Document</title> | |
<style> | |
pre { | |
/* overflow-x: auto; */ | |
white-space: pre-wrap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p> | |
This post is based on a detailed note-cum-log I wrote as I was creating the | |
Node Express & MongoDB tutorial Blog API. I think it may be useful for | |
others who are using the | |
<a href="https://raviswdev.blogspot.com/2024/01/roadmap-to-learning-full-stack-web.html">roadmap to full stack web development</a> | |
that I have provided. | |
</p> | |
<p> | |
The steps I followed to successfully create a Node Express & Mongo DB | |
tutorial Blog API which worked with the React tutorial Blog application after |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Document</title> | |
</head> | |
<body> | |
<main id="main"></main> | |
<!-- <div id="bodydiv"></div> --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require("express"); | |
const cors = require("cors"); | |
const { createProxyMiddleware } = require("http-proxy-middleware"); | |
const app = express(); | |
app.use(cors()); | |
app.use( | |
"/", | |
createProxyMiddleware({ | |
target: "https://sathyasaiwithstudents.blogspot.com", |
OlderNewer