Category "reactjs"

Next.js, using random properties without triggering "did not match on server/client" error

I'd like to randomly generate the id property of form inputs, to prevent them from potentially conflicting with other inputs with the same id. This could happen

How to remove double quotes from beginning and end of numbered value in a list [duplicate]

I have data as follow: let str = "1,2,3,4" and, I want to transform it into arr = [1,2,3,4]

Google API - Places autocomplete in React Native Expo Project

I am developing mobile app using React Native Expo. I am using react-native-google-places-autocomplete for text auto completetion of location/places. It is Goog

How to overlay text on an SVG path element in React without using the coordinates of the path element?

I am attempting to create a global COVID-19 tracker for each country using React. In order to carve out individual countries and present them I have used an SVG

emotion use css prop with custom components

In my application I have a component that I want to style with the css prop from outside. function Component({css}:{css?: React.CSSProperties}) { // some stuf

Cors issues with JWT Authentication for WP REST API and local React project

I succesfully installed "JWT Authentication for WP REST API" and followed (and reviewed multiple times) the instructions for setup correctly. My React app does

How to validate AzureAD accessToken in the backend API

I just wanted to know how can we validate the azure ad access token in a backend API in my case i.e. Django rest framework. Consider that I have a single page a

how customize style materail UI v5

I am trying to customize MUI to that import makeStyles import { makeStyles } from '@mui/styles'; I get this error when try install npm install @mui/styles npm

How do I not allow special characters and space in react hook using yup

Here's the code: { label: "Name", name: "name", placeholder: 'Name', type: "text", rule: yup.string() .required('Name is a r

React-18 | You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before

In my react-based library, I was using ReactDOM.render at 3 different levels. The first level is at the root level and I am clear and replaced it using the belo

Testing functions with arguments in React with Jest Enzyme

I have a function named toggleFilter() in a react component which looks like this: toggleFilter = (filterType, filterName) => { const filterApplied

How to share state (react)between electron's multiple windows?

I am developing a desktop app with react for UI and electron. So, for now, I am fetching data from the server and saving it in the state using React's Context

Typescript dynamic type depends on value (generic)

Is it possible get dynamic type depended on value of key dataIndex (create dynamic discriminating union type with generic)? type EntityList<EntityType> =

Coinbase extension popup requires remove the cache every time for connection

I am having trouble connecting the coinbase wallet in my application and I was wondering if you could help me with this. My issue is that I am using the web3-re

How to perform tree shaking for lodash in a create-react-app project?

I need to perform tree-shaking to reduce bundle sizes where lodash and some other libraries are being used. I've converted all lodash imports like this: import

Next Auth "Credentials" redirection when throwing error on custom login page

I have a custom login page, which in turn calls the signIn() function when submitting the form. I am only using the "Credentials" provider. Server-side, I am ju

Options for User Session Management with React and Flask

After days of reading through the source code of Flask and Flask-Login and trying to figure out why my user sessions aren't being visibly accessible outside the

How to use syntax code highlighting using next-mdx-remote?

I'm trying to highlight my code syntax using next-mdx-remote in my Nextjs based page. I'm getting my markdown format from graphcms and rendering it like this :

How i can limit the items in the FlatList and add load more?

My skills is basic, and i'm newbie in React native, what i want to do is limit the posts in 12 and when the user scroll automatically load more posts. My Code:

Installing create-react-app gives npm ERR! shasum check failed and npm ERR! Unexpected end of JSON input while parsing near '...mojOzGIEI2rg0m24Yb5Oq'

Errors when i use sudo npm install create-react-app -g npm ERR! Linux 4.13.0-39-generic npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "i" "create-react-app" "-g"