const string = "example@gmail.com";
const substring = "@gmail.com";
console.log(string.includes(substring));
Hi, I have a question,
How to add watchlist/wishlist item to MongoDB using nodejs and react js?
Please the link for details description:
https://stackoverflow.com/questions/71468023/how-to-add-watchlist-wishlist-item-to-mongodb-using-nodejs-and-react-js
Thanks a million for the help
Hi Everyone, LinkedIn is hiring a Software Engineer - Android. Anywhere in the US, full time.
In this role, you will design and execute user-facing features for the native LinkedIn app as well as LinkedIn Learning app on Android devices, by leveraging mobile operating system frameworks for multi-threading, persisting data, and managing user experience and graphics across multiple screen sizes.
Key Skills: API, Android, OOP, (MVC/MVVM/MVP), Data structures and Algorithms
Please send your resume directly at masundaray@linkedin.com, or ping me if you have any queries.
Deployment issue with github pages:
after commit all the changes pushed to github remote repo, then
added the url of homepage https://<username>.github.io/<app-name>
in package.json file and
also added this to script
"predeploy": "npm run build",
"deploy": "gh-pages -d build",
then runnpm run deploy
but the deployed link showing nothing blank page(
When it didn't work I tried this..
homepage: https://<username>.github.io/
then
"predeploy": "npm run build",
"deploy": "gh-pages -b main -d build",
and then again deployed but this time I have another new issue..
in github something pushed annoying,
and these are my actual files which I pushed..
git revert {commit_id}
"homepage" : "http://<username>.github.io/<app-name>"
"homepage" : "http://<username>.github.io/<app-name>"
localhost:3000/<app-name>
instead localhost:3000/
For now locally I have changed my "Home" component route / to /app-name, then it works fine and render the page!
But in deployment, it also shows…
This is my APP.jsx component
import "./App.css";
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import CardSection from "../DisplayBookContainer/CardSection";
import DisplayBook from "../DisplayBookContainer/DisplayBook";
import Home from "../Home/Home";
import NavBar from "../NavBar/NavBar";
import Footer from "../FooterContainer/Footer";
import { createContext, useState } from "react";
console.log(CardSection);
export let globalData = createContext();
function App() {
const [searchData, serSearchData] = useState("");
return (
<globalData.Provider value={{ searchData, serSearchData }}>
<Router>
<div className="App">
<NavBar />
<Routes>
<Route exact path="/bookstore" element={<Home />}></Route>
<Route exact path="/results" element={<DisplayBook />}></Route>
</Routes>
<Footer />
</div>
</Router>
</globalData.Provider>
);
}
export default App;
But in home page it showing look like this
The code for Home compoment is
import React from "react";
import FeatureAuthor from "../FeatureAuthors/FeatureAuthor";
import GallaryCardContainer from "../GallaryContainer/GallaryCardContainer";
import CollectionSection from "./CollectionSection";
function Home() {
return (
<div className="App">
<CollectionSection />
<div className="flat-banner">
<img
src=" https://d2g9wbak88g7ch.cloudfront.net/promotionimages/1_alltimefavourite.jpg"
alt="banner img"
style={{ maxWidth: "100%", marginTop: ".2rem" }}
/>
</div>
<GallaryCardContainer />
<FeatureAuthor />
</div>
);
}
export default Home;
Hi guys...I'm a bit new in react ..try to build something using react/redux..... I got a the following problem... I would like to dispatch an action an get back the promise
for example I have a modal to update a user profile. Once the action is dispatched and the back-end return I would like to close the modal.
I tried this bat I get the following error
dispatch(updateProfile(formData)).then(() => console.log('profile updated'))
Uncaught TypeError: dispatch(...) is undefined
This happened because I call .then after the dispatch... How can I get a promise from that?