Category "reactjs"

"Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0" ERROR -- NodeJS, MongoDB, React Application

I'm trying to fetch an array from my user database from my react app. The response I'm getting is an HTML file, but I'm not sure why it's not working as I have

CRA - Jest mock loses the mock implementation

I'm trying to use __mocks__. src/shared/state/use-some-state.ts export const useSomeState = () => { return { value: 6 }; } which is exported from an index

How to install next-js with react 17?

How I can install next.js with React 17? When I type: npx create-next-app --ts, npx installed Next with React 18, but I can't use React 18, because Stripe not w

react native render error (view config getter callback for component 'div'?

I have a problem with react-native. I'm trying exercise to do todo app from how I watch on youtube lessons. Can't understand where is my fault? Youtuber instruc

Rendering based on Enum in ReactJS

In App.js import "./styles.css"; import { IconType }, Icon from "./icons"; //<-this line gives syntax error export default function App() { return <I

How to add loading Spinner when first time loaded the website

I'm using React. New in React and nodejs. My application takes a few times before it loads the component and that time is spent in loading resources and validat

Customize the default font family on Strapi V4 headless CMS?

How can I change the default font-family of the admin Strapi v4 dashboard? because I found nothing of how we can change the default Strapi v4 font-family

How to upload images to Firebase web v9 using reactjs

I am having an issue concerning uploading images to firebase but using web version 9. I am following along with a toturial on one of the platforms in which he i

How to solve "Firebase: Error (auth/invalid-api-key)" error in react app environment

I'm using environment variables to avoid from hardcoding my API key into my config files. Tried a lot of things: making sure I copied the API keys correctly, re

Dynamically build classnames in TailwindCss

I am currently building a component library for my next project with TailwindCss, I just ran into a small issue when working on the Button component. I'm passin

Dynamically build classnames in TailwindCss

I am currently building a component library for my next project with TailwindCss, I just ran into a small issue when working on the Button component. I'm passin

Popup which persists through page redirect Next.js (React)

I am using Next.js for one of the projects that I work on. I wonder if someone could help me with an advice on how to show a popup (popup component, I think it

Accordion height automatically increases when any accordion expands in same row mui

Accordion height of any accordion automatically increases when any accordion expands in same row mui, Here's my code:- {[1,2,3,4,5].map((i)=>

How to break eslint or webpack build if any component has imported data from ./Stories/* folder

We have a React/TS project which bacame too big. In this project we use eslint (airbnb) and StoryBook. Our components structure is: /Stories <-- folder for S

How to find the degree of rotation for marker on map while using react-native-maps with google maps api?

I am trying to make an uber like app using react-native. I am using react-native-maps. I have successfully mapped the directions using directions api of google

How set up a project with nextjs and SQLite3 in electron?

This is the first time with electron, i found a repo called nextron on github, but there are no examples with SQLite3. Do you have a boilerplate? How can i reac

Nested scrolling inside Swiper in react

I have a vertical swiper where in one of the slides I have a box with overflowing Y content, I want the user to be able to scroll vertically within the box. But

MongooseError: Operation `therapists.find()` buffering timed out after 10000ms

I have seen this issue published in a few places however I still don't have a solution. I am using a node server and can connect to my database correctly with a

'npm run build' failed in AWS CodeBuild but succeeded locally

I have a ReactJS application deployed to AWS using CodePipline and CodeBuild. However, in the AWS CodeBuild stage the 'npm run build' always failed with error:

Make hooks stop randomizing background color

So I wanted to use hooks for an exercise where I have a circle follow my cursor in React ( and then see other users circles using node) so I've set a randomColo