id stringlengths 7 11 | source stringclasses 1
value | category stringclasses 11
values | title stringlengths 15 214 | text stringlengths 70 30.5k | url stringlengths 57 160 | tags stringlengths 3 113 | created_at int64 1.22B 1.79B |
|---|---|---|---|---|---|---|---|
se_69359599 | stackoverflow | FRONTEND_DEVELOPMENT | Best way to check JWT expire status if stored in localStorage | Best way to check JWT expire status if stored in localStorage
I want to check if the token is expired on client side.
My token is stored in localstorage.
Now what I do is: make a call to the server to check if it is valid but I only do it when the path is: https:exp.com/
code:
useEffect(() => {
verifyToken(auth.... | https://stackoverflow.com/questions/69359599/best-way-to-check-jwt-expire-status-if-stored-in-localstorage | javascript, node.js, reactjs, jwt | 1,632,823,007 |
se_66975307 | stackoverflow | FRONTEND_DEVELOPMENT | how to get an useEffect inside a function in React? | how to get an useEffect inside a function in React?
I'm trying to make an countdown website for a project. I want that the countdown is triggered by a button. I'm using React but i keep getting this error
React Hook "useEffect" is called in function "countdown" that is neither a React function component nor a custom R... | https://stackoverflow.com/questions/66975307/how-to-get-an-useeffect-inside-a-function-in-react | javascript, reactjs | 1,617,737,324 |
se_62755611 | stackoverflow | FRONTEND_DEVELOPMENT | how to show speedometer on Doughnut chart in chart.js using reactjs | how to show speedometer on Doughnut chart in chart.js using reactjs
I've created a half doughnut chart and wanted to show like a speedometer, but couldn't able to make it. I have gone through this link I want to display my chart Either as similar to the above link or as per this snippet
Here is my code:
import React,... | https://stackoverflow.com/questions/62755611/how-to-show-speedometer-on-doughnut-chart-in-chart-js-using-reactjs | reactjs, chart.js | 1,594,036,810 |
se_49956900 | stackoverflow | FRONTEND_DEVELOPMENT | Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource - react js | Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource - react js
I run my project on my Mac OS device and I want to access from another laptop.
the first device gets all responses from the server as well:
http://192.168.1.101:3000/
but another laptop I got this error message:
Cross... | https://stackoverflow.com/questions/49956900/cross-origin-request-blocked-the-same-origin-policy-disallows-reading-the-remot | javascript, reactjs | 1,524,321,622 |
se_51833429 | stackoverflow | FRONTEND_DEVELOPMENT | React App Proxy Error: Could Not Proxy Request | React App Proxy Error: Could Not Proxy Request
I am working on a group project that was deployed on Heroku, but now I need to do further work on it and am trying to get it to run locally again. It is a React app that uses MongoDB. I cloned the repo and did npm install in both the root folder and the client folder. Whe... | https://stackoverflow.com/questions/51833429/react-app-proxy-error-could-not-proxy-request | reactjs, proxy | 1,534,218,379 |
se_79949167 | stackoverflow | FRONTEND_DEVELOPMENT | Confused about React TypeScript function and function component declarations | Confused about React TypeScript function and function component declarations
I'm wondering why some ways of declarations are valid while others are not and are throwing errors as shown below:
Correct
export const useDebounce = <T,>(val: T): T => {
const [debouncedValue, setDebouncedValue] = useState<T>(val)
re... | https://stackoverflow.com/questions/79949167/confused-about-react-typescript-function-and-function-component-declarations | reactjs, typescript, jsx | 1,780,214,069 |
se_39575539 | stackoverflow | FRONTEND_DEVELOPMENT | How to validate a radio button in react.js? | How to validate a radio button in react.js?
I have a group of radio buttons that check for the user's gender.
this is my radio button mark up.
export default class Gender extends React.Component {
genderRow(gender) {
return (
<Radio onBlur={this.props.validate} key={gender.id} name="gender"... | https://stackoverflow.com/questions/39575539/how-to-validate-a-radio-button-in-react-js | javascript, reactjs | 1,474,295,000 |
se_41676054 | stackoverflow | FRONTEND_DEVELOPMENT | How to add fonts to create-react-app based projects? | How to add fonts to create-react-app based projects?
I'm using create-react-app and prefer not to eject.
It's not clear where fonts imported via @font-face and loaded locally should go.
Namely, I'm loading
@font-face {
font-family: 'Myriad Pro Regular';
font-style: normal;
font-weight: normal;
src: local('... | https://stackoverflow.com/questions/41676054/how-to-add-fonts-to-create-react-app-based-projects | css, reactjs, fonts, webpack, create-react-app | 1,484,568,286 |
se_35086162 | stackoverflow | FRONTEND_DEVELOPMENT | React render link containing a variable | React render link containing a variable
I am trying to do the following:
<tbody>
{projects.map(function(project, i) { return (
<tr key={i}>
<td>
{project.id}
</td>
<td>
<a href='#/systemlist?projId={project.id}'>{project.name}</a>
</td>
</tr>
);} ... | https://stackoverflow.com/questions/35086162/react-render-link-containing-a-variable | reactjs, react-router | 1,454,075,369 |
se_67921676 | stackoverflow | FRONTEND_DEVELOPMENT | React Slick slider, current active slide overlapped by next slide | React Slick slider, current active slide overlapped by next slide
I'm currently using Slick in order to make a carousel.
I'm having two issues right now, let's start with the first one.
1)
I'm currently using a slider in which i want to show 3 slides: the current image (Spyro), the previous one (Crash) and the next on... | https://stackoverflow.com/questions/67921676/react-slick-slider-current-active-slide-overlapped-by-next-slide | javascript, css, reactjs, carousel, slick.js | 1,623,330,011 |
se_67749842 | stackoverflow | FRONTEND_DEVELOPMENT | How to reset browser zoom level to '100%' when route change in a Reactjs app | How to reset browser zoom level to '100%' when route change in a Reactjs app
I read a lot of questions about resetting the zoom level in this community, but none of them couldn't resolve my problem. Somebody offered to use the Zoom property of CSS, but the problem with this approach is:
When a user changes the... | https://stackoverflow.com/questions/67749842/how-to-reset-browser-zoom-level-to-100-when-route-change-in-a-reactjs-app | javascript, css, reactjs, browser | 1,622,280,886 |
se_68264893 | stackoverflow | FRONTEND_DEVELOPMENT | error: websocket.js:84 WebSocket connection to 'ws://localhost:5000/socket.io/?EIO=4&transport=websocket' failed: | error: websocket.js:84 WebSocket connection to 'ws://localhost:5000/socket.io/?EIO=4&transport=websocket' failed:
I am building a realtime chat application using reactJs, node and socket.io . But i am getting the error that websocket connection has failed. This is the error which i am getting in the conso... | https://stackoverflow.com/questions/68264893/error-websocket-js84-websocket-connection-to-ws-localhost5000-socket-io-e | javascript, node.js, reactjs, websocket | 1,625,548,362 |
se_61192867 | stackoverflow | FRONTEND_DEVELOPMENT | React Testing Library, Component Unit Tests | React Testing Library, Component Unit Tests
I am trying to build a test unit for my simple React Application using React Testing Library. I readed all docs and get stuck in it.
API was created by create React app. One of the feature is that user can change theme. There is setTheme hook that going to change theme "dar... | https://stackoverflow.com/questions/61192867/react-testing-library-component-unit-tests | javascript, reactjs, unit-testing, testing, react-testing-library | 1,586,797,516 |
se_50535802 | stackoverflow | FRONTEND_DEVELOPMENT | React Flow ESlint: parsing error unexpected token, expected ',' | React Flow ESlint: parsing error unexpected token, expected ','
I am trying to use Flow alongside ESlint in React. I have a basic Container component that takes a children prop. Here is the component code:
// @flow
import * as React from 'react';
import styled from 'react-emotion';
const Wrapper = styled.div... | https://stackoverflow.com/questions/50535802/react-flow-eslint-parsing-error-unexpected-token-expected | reactjs, eslint, flowtype | 1,527,276,860 |
se_63233868 | stackoverflow | FRONTEND_DEVELOPMENT | Module not found: Can't resolve '@ckeditor/ckeditor5-build-tong' | Module not found: Can't resolve '@ckeditor/ckeditor5-build-tong'
I was trying to import the package that i download from online ckeditor builder. Am i doing it correctly? How should I import it?
npm install from the ckeditor folder.
npm build from the ckeditor folder.
editor.jsx
import React, { Component... | https://stackoverflow.com/questions/63233868/module-not-found-cant-resolve-ckeditor-ckeditor5-build-tong | javascript, reactjs, npm, ckeditor, npm-install | 1,596,474,262 |
se_67793414 | stackoverflow | FRONTEND_DEVELOPMENT | How to pass parameters into a function in Context Reactjs | How to pass parameters into a function in Context Reactjs
I need to call a parameterized function which is in Context from another component. Below is the code snippet.
Context
Sortdata=(id)=> {
console.log("passed from homepage",id)
if(this.state.data>parseInt(id)){
recorddata.sort((a,b)=>{
... | https://stackoverflow.com/questions/67793414/how-to-pass-parameters-into-a-function-in-context-reactjs | reactjs, react-redux, react-context | 1,622,568,172 |
se_76561157 | stackoverflow | FRONTEND_DEVELOPMENT | Send Button in Contact Form is not Submitting | Send Button in Contact Form is not Submitting
I am working on a contact form for my website where users can enter their name, email, and message, and the inquiry should be sent to the office's main email. I am using the SendGrid API to handle the email sending, and I have implemented the code for email handling in a f... | https://stackoverflow.com/questions/76561157/send-button-in-contact-form-is-not-submitting | javascript, reactjs, forms, button, sendgrid | 1,687,830,851 |
se_76993179 | stackoverflow | FRONTEND_DEVELOPMENT | How to mock MUI5 Pro license key in Jest tests for React components | How to mock MUI5 Pro license key in Jest tests for React components
I'm currently integrating MUI v5 Pro components into my React library and then import those library components into my host app. I have set up the MUI license key in the .env file of both the library and the host app, and I'm importing the necessary c... | https://stackoverflow.com/questions/76993179/how-to-mock-mui5-pro-license-key-in-jest-tests-for-react-components | reactjs, jestjs, material-ui, vite | 1,693,228,797 |
se_36998120 | stackoverflow | FRONTEND_DEVELOPMENT | How to render multiple shadows on one element? | How to render multiple shadows on one element?
For example, how to accomplish
box-shadow: 2px 2px 4px rgba(0, 0, 0, .05), -2px -2px 4px rgba(0, 0, 0, .05);
in react native stylesheet? | https://stackoverflow.com/questions/36998120/how-to-render-multiple-shadows-on-one-element | css, reactjs, react-native | 1,462,260,299 |
se_53128038 | stackoverflow | FRONTEND_DEVELOPMENT | How to clear input after onClick with ReactJS | How to clear input after onClick with ReactJS
I need to implement a clear/reset for the inputs after onClick occurs, and also after it is stored in localStorage. I can't seem to figure out how to code this and where. Here is my add function and render function.
addExpense(e) {
e.preventDefault()
let exList = this.sta... | https://stackoverflow.com/questions/53128038/how-to-clear-input-after-onclick-with-reactjs | javascript, reactjs, jsx | 1,541,214,280 |
se_57118110 | stackoverflow | FRONTEND_DEVELOPMENT | Next.js CompononentDidMount called before page loaded | Next.js CompononentDidMount called before page loaded
I setState show to true inside componentDidMount and inside render there is an if(this.state.show == true) return(components...) so what i want is my components should be displayed when page load is completed by next.js.
But for some reason componentdidmount is ca... | https://stackoverflow.com/questions/57118110/next-js-compononentdidmount-called-before-page-loaded | reactjs, next.js | 1,563,561,876 |
se_68611909 | stackoverflow | FRONTEND_DEVELOPMENT | Warning: Invalid attribute name: `'data-*'` | Warning: Invalid attribute name: `'data-*'`
I'm trying to import svg file in NEXT.js using babel-plugin-inline-react-svg.
Followed all instructions and it works fine.
// .babelrc
{
"presets": ["next/babel"],
"plugins": [
["styled-components", { "ssr": true }],
"inline-react-svg"
]
}
// image.tsx... | https://stackoverflow.com/questions/68611909/warning-invalid-attribute-name-data | reactjs, typescript, svg, next.js, react-typescript | 1,627,832,083 |
se_72687127 | stackoverflow | FRONTEND_DEVELOPMENT | Failed to resolve import ScrollSmoother | Failed to resolve import ScrollSmoother
It says it failed to resolve import ScrollSmoother
thats my code :
import gsap from "gsap"
import ScrollTrigger from 'gsap/ScrollTrigger';
import ScrollSmoother from "gsap/ScrollSmoother";
gsap.registerPlugin(ScrollTrigger,ScrollSmoother) <-------
const Navbar = () => {
... | https://stackoverflow.com/questions/72687127/failed-to-resolve-import-scrollsmoother | reactjs, gsap, vite | 1,655,728,733 |
se_68899565 | stackoverflow | FRONTEND_DEVELOPMENT | What causes the typescript Module has no exported member .ts(2305) error and how do you fix it? | What causes the typescript Module has no exported member .ts(2305) error and how do you fix it?
This is my first time using typescript with React and I'm have a tremendous amount of trouble with the typescript Module has no exported member .ts(2305) error. Here are 2 examples of this happening:
import { BrowserRouter,... | https://stackoverflow.com/questions/68899565/what-causes-the-typescript-module-has-no-exported-member-ts2305-error-and-how | reactjs, typescript | 1,629,756,574 |
se_48567247 | stackoverflow | FRONTEND_DEVELOPMENT | Reactstrap: Getting Modal to work | Reactstrap: Getting Modal to work
Trying to learn React and Reactstrap and trying to get Modals to work. When I click the button, it should toggle the Modal, but right now it's giving me this error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but ... | https://stackoverflow.com/questions/48567247/reactstrap-getting-modal-to-work | javascript, reactjs, reactstrap | 1,517,501,868 |
se_79947401 | stackoverflow | FRONTEND_DEVELOPMENT | Advice needed on a React application with Laravel backend | Advice needed on a React application with Laravel backend
I'm currently working on a personal project related to Warhammer. Because I needed to test some things, I have made an test project for a quiz that would help select a faction. But I'm kind of still looking for advise to improve it.
At first I had all the facti... | https://stackoverflow.com/questions/79947401/advice-needed-on-a-react-application-with-laravel-backend | reactjs, laravel, backend, web-frontend | 1,779,889,728 |
se_66261207 | stackoverflow | FRONTEND_DEVELOPMENT | How to add edit button and function in react.js | How to add edit button and function in react.js
i want to share this question. So, i have a form which is designed by react-bootstrap. And also use React Hooks and React Function Component. I have a form which is add new form and delete form but i don't do edit form.
This is a return statement
return(
<Contain... | https://stackoverflow.com/questions/66261207/how-to-add-edit-button-and-function-in-react-js | reactjs, react-hooks | 1,613,655,786 |
se_71877958 | stackoverflow | FRONTEND_DEVELOPMENT | Removing React project dependencies involving the es5-ext protestware? | Removing React project dependencies involving the es5-ext protestware?
I've recently come to discover this ridiculous notion of protestware.
In my particular case it is related to the lastest version of the es5-ext package.
The recommendation i've received is to downgrade to version 0.10.53.
Unfortunately, this is ope... | https://stackoverflow.com/questions/71877958/removing-react-project-dependencies-involving-the-es5-ext-protestware | node.js, reactjs, npm | 1,649,972,796 |
se_63887009 | stackoverflow | FRONTEND_DEVELOPMENT | How can I start my project from .next folder? | How can I start my project from .next folder?
I want to start my NextJS project from build folder (.next). I ran next build command, got .next folder and... I tried start project from .next folder many times and used a lot of ways, but I wasn't successful. Can anyone explain me what I need to do for starting my NextJS... | https://stackoverflow.com/questions/63887009/how-can-i-start-my-project-from-next-folder | reactjs, next.js | 1,600,095,997 |
se_66780848 | stackoverflow | FRONTEND_DEVELOPMENT | TinyMCE input being written in reverse order | TinyMCE input being written in reverse order
I am facing this issue where whenever I type in TinyMCE my cursor shifts to left automatically and I end up writing text from right to left. Its only happening in my deployed application but same works fine if I run the code locally on my machine. Any possible reason why th... | https://stackoverflow.com/questions/66780848/tinymce-input-being-written-in-reverse-order | javascript, reactjs, tinymce | 1,616,588,218 |
se_72325544 | stackoverflow | FRONTEND_DEVELOPMENT | React Component - Cannot read properties of null (reading 'useState') | React Component - Cannot read properties of null (reading 'useState')
I am building a little local dev/testing/documentation environment for some components which are used across different projects and so want to create them as individual npm packages.
Everything was working perfectly until I tried to use useS... | https://stackoverflow.com/questions/72325544/react-component-cannot-read-properties-of-null-reading-usestate | javascript, reactjs, npm, react-hooks, use-state | 1,653,088,674 |
se_58558370 | stackoverflow | FRONTEND_DEVELOPMENT | react-router generatePath with query parameters | react-router generatePath with query parameters
I am using react-router's built in function generatePath to generate a URL. The issue is that as far as I understand this function just returns the path and doesn't provide a mechanism for us to know which fields were added in the path and which were not.
For example, f... | https://stackoverflow.com/questions/58558370/react-router-generatepath-with-query-parameters | reactjs, react-router, react-router-v4, react-router-dom | 1,572,005,758 |
se_73905076 | stackoverflow | FRONTEND_DEVELOPMENT | Running Nextjs App and getting err_connection_refused | Running Nextjs App and getting err_connection_refused
So, I'm trying to learn Nextjs. I followed all the instructions on the getting started page, but when I navigate to http://localhost:3000, I get the Err_Connection_Refused message.
What I did:
npx create-next-app myproject --use-npm
I then get a success message. Th... | https://stackoverflow.com/questions/73905076/running-nextjs-app-and-getting-err-connection-refused | reactjs, next.js, localhost | 1,664,521,270 |
se_64555077 | stackoverflow | FRONTEND_DEVELOPMENT | Type annotations can only be used in TypeScript files.ts(8010) - React tsx file | Type annotations can only be used in TypeScript files.ts(8010) - React tsx file
I am using core-ui project and I am trying implement Typescript on my component files.
I'm getting an error from VSCODE which does't allow me to use it in files with tsx extention.
const TheLayout: React.FunctionComponent = () => {}
Getti... | https://stackoverflow.com/questions/64555077/type-annotations-can-only-be-used-in-typescript-files-ts8010-react-tsx-file | reactjs, typescript | 1,603,803,859 |
se_48713750 | stackoverflow | FRONTEND_DEVELOPMENT | How to change the background color of an ant.design InputNumber? | How to change the background color of an ant.design InputNumber?
<InputNumber
min={13}
max={125}
defaultValue={this.props.defaultValue}
style={{
width: this.props.width,
borderColor: this.props.colorTheme.text6Color, <= Working
backgroundColor: this.p... | https://stackoverflow.com/questions/48713750/how-to-change-the-background-color-of-an-ant-design-inputnumber | reactjs, antd | 1,518,208,754 |
se_71295387 | stackoverflow | FRONTEND_DEVELOPMENT | How can I import an existing React project in Visual Studio? | How can I import an existing React project in Visual Studio?
How do I properly import an existing React project being developed in Visual Studio Code into Visual Studio 2022? | https://stackoverflow.com/questions/71295387/how-can-i-import-an-existing-react-project-in-visual-studio | reactjs, visual-studio-2019, visual-studio-2022 | 1,646,053,128 |
se_73332628 | stackoverflow | FRONTEND_DEVELOPMENT | How do I make the letters in my material-ui button NOT all capitalized? | How do I make the letters in my material-ui button NOT all capitalized?
In my code, the letters in the word "Add" are not all capitalized, which is correct.
My code:
return {
<Container sx={{ mt: 6, ml: 6} } maxWidth="xl">
<TextField id="" label="Enter title" variant="outlined"/>
<Button sx={{ ml: 6} } var... | https://stackoverflow.com/questions/73332628/how-do-i-make-the-letters-in-my-material-ui-button-not-all-capitalized | reactjs, material-ui | 1,660,299,630 |
se_75305097 | stackoverflow | FRONTEND_DEVELOPMENT | What are some options to handle a scheduled task based on a given datetime in the database? | What are some options to handle a scheduled task based on a given datetime in the database?
Im using react and node.js
Im trying to build a site that has multiple countdown timers where an user can join in before it hits 0. These countdown timers are displayed based on a pre-set datetime value in the database. When t... | https://stackoverflow.com/questions/75305097/what-are-some-options-to-handle-a-scheduled-task-based-on-a-given-datetime-in-th | node.js, reactjs, cron, scheduled-tasks, cron-task | 1,675,218,901 |
se_32751405 | stackoverflow | FRONTEND_DEVELOPMENT | importing and exporting modules in react | importing and exporting modules in react
I'm working in a React.js project which I need to import some JavaScript in others, and some others I have to export it.
For example I have A.js which needs some library:
var EventEmitter = require('EventEmitter');
var React = require('react');
//some code here
//some functio... | https://stackoverflow.com/questions/32751405/importing-and-exporting-modules-in-react | javascript, node.js, module, reactjs, require | 1,443,053,456 |
se_69843064 | stackoverflow | FRONTEND_DEVELOPMENT | Fix for vulnerability - "Critical Prototype Pollution in immer" Patched >=9.0.6 | Fix for vulnerability - "Critical Prototype Pollution in immer" Patched >=9.0.6
Here's a fix for the following vulnerability:
Critical Prototype Pollution in immer
Package immer
Patched in >=9.... | https://stackoverflow.com/questions/69843064/fix-for-vulnerability-critical-prototype-pollution-in-immer-patched-9-0-6 | reactjs, npm, dependencies, immer.js, npm-vulnerabilities | 1,636,045,064 |
se_55536389 | stackoverflow | FRONTEND_DEVELOPMENT | How to navigate on a page without reloading the page | How to navigate on a page without reloading the page
I have navigation in react and want to redirect to the listing page on click.using this right now which is loading the page
This is my Header.js file
return (
<Link to="/allusers">All Users</Link>
);
This is my App.js file
I imported this
import UsersList from ... | https://stackoverflow.com/questions/55536389/how-to-navigate-on-a-page-without-reloading-the-page | reactjs | 1,554,470,510 |
se_66631959 | stackoverflow | FRONTEND_DEVELOPMENT | React "Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node" with Chrome Extension | React "Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node" with Chrome Extension
I've seen similar questions to this one, but none solve my problem.
I have a chrome extension where I highlight some content on the page by creating a fragment and repla... | https://stackoverflow.com/questions/66631959/react-failed-to-execute-removechild-on-node-the-node-to-be-removed-is-not | javascript, reactjs, google-chrome, google-chrome-extension | 1,615,778,449 |
se_43142603 | stackoverflow | FRONTEND_DEVELOPMENT | date of birth input mask react | date of birth input mask react
I am using this react input mask.
The input mask is being used for a user's date of birth. This works, however, the issue I am having is that a user can enter 54/54/2017 into the input box. I want to prevent this. One way I can do this is by entering a 0 before the first input if less t... | https://stackoverflow.com/questions/43142603/date-of-birth-input-mask-react | javascript, reactjs, input, input-mask | 1,490,968,823 |
se_78820566 | stackoverflow | FRONTEND_DEVELOPMENT | How to get the key from a list obj in html-javascript | How to get the key from a list obj in html-javascript
I have an array of obj for employees and when the user tries to delete on of them there is a message popping up asking them if they want to continue with the proccess. If they press yes the employee is deleted.
The problem is that in the list tag where the key={ind... | https://stackoverflow.com/questions/78820566/how-to-get-the-key-from-a-list-obj-in-html-javascript | javascript, html, reactjs, list, key | 1,722,509,962 |
se_79078045 | stackoverflow | FRONTEND_DEVELOPMENT | App restarting when I ask for permissions, permissions change | App restarting when I ask for permissions, permissions change
In my react native app, when I ask an user for permissions (camera, recording), the app gets restarted and sometimes I lose the state of the process which can turn into some issues. Is there a way to avoid this?
I tried with this code in my app.js, but the ... | https://stackoverflow.com/questions/79078045/app-restarting-when-i-ask-for-permissions-permissions-change | reactjs, react-native | 1,728,646,512 |
se_64176112 | stackoverflow | FRONTEND_DEVELOPMENT | Module not found: Can't resolve 'react-bootstrap/Navbar' | Module not found: Can't resolve 'react-bootstrap/Navbar'
I keep getting this error despite having tried to install react-bootstrap, reactstrap, adding the scripts and imports from react-bootstrap documentation.
I have tried : npm i react-bootstrap --save
And: npm install react-bootstrap bootstrap
I have cr... | https://stackoverflow.com/questions/64176112/module-not-found-cant-resolve-react-bootstrap-navbar | reactjs, react-router, navbar, react-bootstrap | 1,601,660,824 |
se_73228662 | stackoverflow | FRONTEND_DEVELOPMENT | Unable to pull database from realtime database of Google in next js app | Unable to pull database from realtime database of Google in next js app
Currently I am not able to pull the database from Google Realtime Database and I am not sure what I am doing wrong. Below is the code that is in my Categories page.
import CategoryHeader from '../../components/CategoryHeader';
import database from... | https://stackoverflow.com/questions/73228662/unable-to-pull-database-from-realtime-database-of-google-in-next-js-app | reactjs, firebase-realtime-database, next.js | 1,659,567,482 |
se_74208688 | stackoverflow | FRONTEND_DEVELOPMENT | Failing to redirect to the dashboard page after successful login using node.js and react.js | Failing to redirect to the dashboard page after successful login using node.js and react.js
I'm failing to redirect admins to the ecommerce page after they successfully log in.
When I try to redirect the admins, they are redirected to http://localhost:3001/ecommerce, though I want them to be redirected to http://loca... | https://stackoverflow.com/questions/74208688/failing-to-redirect-to-the-dashboard-page-after-successful-login-using-node-js-a | node.js, reactjs, express | 1,666,791,090 |
se_74826217 | stackoverflow | FRONTEND_DEVELOPMENT | How to pass data to an action using redux-toolkit in react js? | How to pass data to an action using redux-toolkit in react js?
I'm trying to display a list of categories from mongodb. Each user can see only his own categories.
I'm using Reactjs and redux-toolkit in the frontend and NodeJs in the backend.
The issue is that when I get the data, fetchAll returns all categories. What ... | https://stackoverflow.com/questions/74826217/how-to-pass-data-to-an-action-using-redux-toolkit-in-react-js | reactjs, redux-toolkit | 1,671,203,067 |
se_76291982 | stackoverflow | FRONTEND_DEVELOPMENT | Trying to post a formData using axios.post but getting `Unsupported Media type` error | Trying to post a formData using axios.post but getting `Unsupported Media type` error
I am trying to send a post request to a spring boot server via axios.post.
Here is my code snippet:
export function createSingleProduct(productData) {
const formData = new FormData();
const data = {
categoryName: productData[... | https://stackoverflow.com/questions/76291982/trying-to-post-a-formdata-using-axios-post-but-getting-unsupported-media-type | javascript, reactjs, axios, multipartform-data, form-data | 1,684,524,924 |
se_76204100 | stackoverflow | FRONTEND_DEVELOPMENT | Uncaught runtime errors in localhost:3000 | Uncaught runtime errors in localhost:3000
I am using the maps JavaScript API (google API) and running into a uncaught runtime error in my react application. The website seems to run fine, so it is difficult to know where this error is coming from. The answer might just be to have the app ignore this warning but a real... | https://stackoverflow.com/questions/76204100/uncaught-runtime-errors-in-localhost3000 | reactjs, google-maps, localhost, create-react-app | 1,683,577,205 |
se_55494341 | stackoverflow | FRONTEND_DEVELOPMENT | How to get colspan=2 in grid css layout? | How to get colspan=2 in grid css layout?
In my react component I am trying (first time) to use a css grid layout. The column should span 2 but it is only 1:
< Value textAlign="right" gridCol={1} gridRow={index + 3} weight={'regular'}>
<select>
<option />
<opt... | https://stackoverflow.com/questions/55494341/how-to-get-colspan-2-in-grid-css-layout | reactjs, css, css-grid, styled-components | 1,554,291,772 |
se_79945918 | stackoverflow | FRONTEND_DEVELOPMENT | Convert React script running using a CDN to use server installed React | Convert React script running using a CDN to use server installed React
This code
<script crossorigin="" src="https://unpkg.com/react@18/umd/react.production.min.js"></script>
<script crossorigin="" src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"></script>
runs React scripts. I've now installed R... | https://stackoverflow.com/questions/79945918/convert-react-script-running-using-a-cdn-to-use-server-installed-react | javascript, reactjs, react-native | 1,779,636,642 |
se_62608937 | stackoverflow | FRONTEND_DEVELOPMENT | Using CDN in React | Using CDN in React
I've installed React via NPM and I'm having difficulty using CDN. I included the CDN scripts in the ./public/index.html file but when I use it in any component, it doesn't recognize the third-party package that I'm trying to use.
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.19.2/axio... | https://stackoverflow.com/questions/62608937/using-cdn-in-react | reactjs, redux, react-router, cdn | 1,593,254,731 |
se_66893762 | stackoverflow | FRONTEND_DEVELOPMENT | Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. React | Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. React
Error:
"Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.You likely forgot to export... | https://stackoverflow.com/questions/66893762/error-element-type-is-invalid-expected-a-string-for-built-in-components-or-a | javascript, reactjs, react-native, expo | 1,617,217,181 |
se_79605706 | stackoverflow | FRONTEND_DEVELOPMENT | "Recoil throws 'Cannot destructure ReactCurrentDispatcher' error - React version mismatch or missing RecoilRoot?" | "Recoil throws 'Cannot destructure ReactCurrentDispatcher' error - React version mismatch or missing RecoilRoot?"
I'm getting this error when using Recoil in my React app:
Uncaught TypeError: Cannot destructure property 'ReactCurrentDispatcher' of 'import_react.default.__SECRET_INTERNALS_DO_NOT_USE_O... | https://stackoverflow.com/questions/79605706/recoil-throws-cannot-destructure-reactcurrentdispatcher-error-react-version | reactjs, recoiljs | 1,746,368,586 |
se_45147692 | stackoverflow | FRONTEND_DEVELOPMENT | console.log this.state is not showing the current state in react | console.log this.state is not showing the current state in react
I'm new to react and toying with a sign-up form. My render method always displays the current state of user.name, user.email and the error attribute is always flagged appropriately.
However, within my bound methods (considerSubmit, validateEmail, etc..)... | https://stackoverflow.com/questions/45147692/console-log-this-state-is-not-showing-the-current-state-in-react | reactjs, state | 1,500,304,113 |
se_52579354 | stackoverflow | FRONTEND_DEVELOPMENT | React and NextJS: How can i detect the Location of my Client? | React and NextJS: How can i detect the Location of my Client?
I have created a Website using NextJS and React. I want to provide the Website in several languages. To achieve this, I wanted to create in the page folder, subfolders, for example for the English language /en, for the German language, /de etc.
When a visi... | https://stackoverflow.com/questions/52579354/react-and-nextjs-how-can-i-detect-the-location-of-my-client | javascript, reactjs, geolocation, next.js | 1,538,321,523 |
se_70939652 | stackoverflow | FRONTEND_DEVELOPMENT | Focus on next input with React Form Hook | Focus on next input with React Form Hook
I created a custom TextInput with React Hook Form, I'm trying to set the focus into the next TextInput.
I explain better: in order to focus the next element, I can easily create an useRef like this:
const passwordRef = useRef<HTMLInputElement>(null);
<FormProvider {...methods}>... | https://stackoverflow.com/questions/70939652/focus-on-next-input-with-react-form-hook | reactjs, react-native, react-hook-form, tsx | 1,643,714,122 |
se_47635318 | stackoverflow | FRONTEND_DEVELOPMENT | Handle iframe in React with refs | Handle iframe in React with refs
I am trying to set the content of an iframe in a React component. I have a component in which contains a handleStatementPrint function which has to be called when the iframe finishes loading. That function must print loaded iframe content - pdf file accessed with URL this.props.pdfs.ur... | https://stackoverflow.com/questions/47635318/handle-iframe-in-react-with-refs | javascript, html, reactjs, iframe, ref | 1,512,396,809 |
se_71988218 | stackoverflow | FRONTEND_DEVELOPMENT | Does React/Material-UI library has image carousel component itself? | Does React/Material-UI library has image carousel component itself?
I'm searching for image slider (carousel) component in React/Material-UI library but I can't find the component in it. Please help me to find image slider component. | https://stackoverflow.com/questions/71988218/does-react-material-ui-library-has-image-carousel-component-itself | reactjs, material-ui, carousel, react-component | 1,650,802,038 |
se_76832020 | stackoverflow | FRONTEND_DEVELOPMENT | Three JS Slider transition with shader? | Three JS Slider transition with shader?
I love shaders because it gives a beautiful effects & and i saw alot of slider effects like this one
https://codepen.io/dev_loop/pen/eYZqMwV
I tried alot to implement the same logic animation into my slider below but couldn't figure out how this is done because he is animation ... | https://stackoverflow.com/questions/76832020/three-js-slider-transition-with-shader | reactjs, three.js, slider, shader, react-three-fiber | 1,691,102,972 |
se_79261975 | stackoverflow | FRONTEND_DEVELOPMENT | Font Not Loading in FabricJS Canvas with WebFontLoader (Dynamic Import) | Font Not Loading in FabricJS Canvas with WebFontLoader (Dynamic Import)
I'm working on a Nextjs project where I need to load a custom font (Rasa from Google Fonts) into a FabricJS canvas, but I'm encountering an issue where the font is not applied until after I interact with the canvas (e.g., clicking on any text).
St... | https://stackoverflow.com/questions/79261975/font-not-loading-in-fabricjs-canvas-with-webfontloader-dynamic-import | reactjs, next.js, canvas, fabricjs | 1,733,640,896 |
se_55201424 | stackoverflow | FRONTEND_DEVELOPMENT | How to get VSCode to show TypeScript errors for files *not* open in the editor? | How to get VSCode to show TypeScript errors for files *not* open in the editor?
In my create-react-app@2.1.8 TypeScript/React app, TS compiler errors are only shown in the Problems pane for files I have open in the VS Code editor. As a result I sometimes don't catch errors until I actually run the app.
How can I get... | https://stackoverflow.com/questions/55201424/how-to-get-vscode-to-show-typescript-errors-for-files-not-open-in-the-editor | reactjs, typescript, visual-studio-code, create-react-app | 1,552,769,895 |
se_76762244 | stackoverflow | FRONTEND_DEVELOPMENT | How can I Render a React component with an array that gets updated by an external function | How can I Render a React component with an array that gets updated by an external function
I have a component that needs to render an array of divs, the array should add another div after a certain function outside the component is triggered, the function is outside the component because it needs to be exported.
The p... | https://stackoverflow.com/questions/76762244/how-can-i-render-a-react-component-with-an-array-that-gets-updated-by-an-externa | javascript, reactjs, jsx | 1,690,284,368 |
se_65680660 | stackoverflow | FRONTEND_DEVELOPMENT | I am having problem using http-proxy-middleware | I am having problem using http-proxy-middleware
I have two servers running in my backend, because of that I have to use the http-proxy-middleware package but I am encountering some problems.
This is my code in the frontend which is running on localhost:3000
axios("/api2/login",data)
.then((res) => {
});
This is m... | https://stackoverflow.com/questions/65680660/i-am-having-problem-using-http-proxy-middleware | node.js, reactjs, express, http-proxy-middleware | 1,610,441,608 |
se_59342552 | stackoverflow | FRONTEND_DEVELOPMENT | Sticky Sidebar In React.js | Sticky Sidebar In React.js
I tried some packages as well as a jquery solution for the same questiion. (I copied the question because of its good explanation). But I want it in React. Help!!!
Sticky sidebar: stick to bottom when scrolling down, top when scrolling up
Sidebar sits under the header.
As you scroll down ... | https://stackoverflow.com/questions/59342552/sticky-sidebar-in-react-js | javascript, reactjs, sidebar, sticky | 1,576,401,303 |
se_72467664 | stackoverflow | FRONTEND_DEVELOPMENT | How to draw Polyline with google-map-react? | How to draw Polyline with google-map-react?
Everyone I am using google-map-react and not react-google-map. Can you help me drawing a line between two points.
<div className='videoDetails__map'>
<GoogleMapReact
bootstrapURLKeys={{
key: "",
}}
... | https://stackoverflow.com/questions/72467664/how-to-draw-polyline-with-google-map-react | reactjs, google-map-react | 1,654,115,125 |
se_76155006 | stackoverflow | FRONTEND_DEVELOPMENT | NextAuth Programmatically SignOut on server-side | NextAuth Programmatically SignOut on server-side
How would I programmatically sign out a user in Next-Auth on the server side?
Inside /api/auth/[...nextauth].js there is a jwt function:
const callbacks = {
async jwt ({ token, user }) {
// How to sign out a user?
signOut(); <--- can't use this on the serv... | https://stackoverflow.com/questions/76155006/nextauth-programmatically-signout-on-server-side | reactjs, next.js, next-auth, next.js13 | 1,683,031,722 |
se_79942774 | stackoverflow | FRONTEND_DEVELOPMENT | Redux Toolkit vs Zustand: which is better for global state management in a Next.js e-commerce app? | Redux Toolkit vs Zustand: which is better for global state management in a Next.js e-commerce app?
I am building an e-commerce application with Next.js and I need to manage global state for features like cart, user authentication, and product listings.
I have experience with both Redux Toolkit and Zustand but I am un... | https://stackoverflow.com/questions/79942774/redux-toolkit-vs-zustand-which-is-better-for-global-state-management-in-a-next | reactjs, next.js, redux, react-state-management, zustand | 1,779,086,156 |
se_71473879 | stackoverflow | FRONTEND_DEVELOPMENT | How to test react form onSubmit with formik and react testing library? | How to test react form onSubmit with formik and react testing library?
I'm learning how to test react form and I don't understand why my test does not success ?
Expected: {"email": "john.dee@someemail.com", "firstName": "John", "lastName": "Dee", "password": "password"}
Number of calls: 0
my form is simple:
... | https://stackoverflow.com/questions/71473879/how-to-test-react-form-onsubmit-with-formik-and-react-testing-library | reactjs, react-testing-library | 1,647,289,751 |
se_67168707 | stackoverflow | FRONTEND_DEVELOPMENT | Hover over div/image to fade out image and have text fade in, but hovering over text removes fade out of image. How to prevent? | Hover over div/image to fade out image and have text fade in, but hovering over text removes fade out of image. How to prevent?
Using React and CSS.
I have my app set where I can hover over the image, and the image will fade to a darker image. Text then fades in over it. BUT, when I touch the text with my cursor, it r... | https://stackoverflow.com/questions/67168707/hover-over-div-image-to-fade-out-image-and-have-text-fade-in-but-hovering-over | javascript, html, css, reactjs, webkit | 1,618,862,978 |
se_49915478 | stackoverflow | FRONTEND_DEVELOPMENT | Test case to check if Button onClick opens a new tab | Test case to check if Button onClick opens a new tab
I am new to UI development and recently I have started to write code in React using Typescript.
I have created a Button and after clicking the same, it opens a menu with some options to select from. If I click on one of the option a new tab will be opened with some... | https://stackoverflow.com/questions/49915478/test-case-to-check-if-button-onclick-opens-a-new-tab | reactjs, typescript, sinon, chai, karma-mocha | 1,524,123,974 |
se_43629599 | stackoverflow | FRONTEND_DEVELOPMENT | Post form data using Fetch in Redux-saga | Post form data using Fetch in Redux-saga
var formData = new FormData(loginRequestObject);
formData.append('userName', loginRequestObject.username);
formData.append('password', loginRequestObject.password);
formData.append('mobile', loginRequestObject.mobile);
formData.append('deviceid', deviceInfo.getDeviceId())
Thi... | https://stackoverflow.com/questions/43629599/post-form-data-using-fetch-in-redux-saga | reactjs, react-native, ecmascript-6, redux-saga | 1,493,197,362 |
se_75231916 | stackoverflow | FRONTEND_DEVELOPMENT | I want to add script in react js when I run command then automatically following things happen | I want to add script in react js when I run command then automatically following things happen
deletion of package-lock.json file
deletion of node module from current app
installing all dependencies which are present in package.json file | https://stackoverflow.com/questions/75231916/i-want-to-add-script-in-react-js-when-i-run-command-then-automatically-following | javascript, node.js, reactjs, arrays, automation | 1,674,638,872 |
se_75533257 | stackoverflow | FRONTEND_DEVELOPMENT | useState and onClick issue in React | useState and onClick issue in React
I'm working on an React app that lists my favorite music albums. Everything worked fine until i implemented the change order (ascend, descend) and the sort list buttons.
On the first click it doesn't react, but on the second click it logs the value of the previous click and renders ... | https://stackoverflow.com/questions/75533257/usestate-and-onclick-issue-in-react | reactjs, react-hooks, onclick | 1,677,071,949 |
se_77182700 | stackoverflow | FRONTEND_DEVELOPMENT | Microfrontend Module Federation using vite/react/typescript: Cannot find module | Microfrontend Module Federation using vite/react/typescript: Cannot find module
I am trying to setup a microfrontend for my project and at base I am using vite to setup my react/typescript applications. I've installed the vite plugin for module federation.
And these are my vite.config.ts:
Host:
import { defineConfig }... | https://stackoverflow.com/questions/77182700/microfrontend-module-federation-using-vite-react-typescript-cannot-find-module | reactjs, typescript, vite, react-typescript, webpack-module-federation | 1,695,754,209 |
se_68565282 | stackoverflow | FRONTEND_DEVELOPMENT | Make multiple pages in ReactJS without using react-dom-router | Make multiple pages in ReactJS without using react-dom-router
I am a beginner in ReactJS web development and I wanted to ask, how can I make multiple pages in ReactJS (for example if I click on a button called "About me" that it will redirect to a different part of the whole site, for example example.com/aboutme) with... | https://stackoverflow.com/questions/68565282/make-multiple-pages-in-reactjs-without-using-react-dom-router | javascript, reactjs, web | 1,627,495,085 |
se_58252454 | stackoverflow | FRONTEND_DEVELOPMENT | React Hooks - using useState vs just variables | React Hooks - using useState vs just variables
React Hooks give us useState option, and I always see Hooks vs Class-State comparisons. But what about Hooks and some regular variables?
For example,
function Foo() {
let a = 0;
a = 1;
return <div>{a}</div>;
}
I didn't use Hooks, and it will give me the s... | https://stackoverflow.com/questions/58252454/react-hooks-using-usestate-vs-just-variables | javascript, node.js, reactjs, react-hooks | 1,570,310,727 |
se_46258983 | stackoverflow | FRONTEND_DEVELOPMENT | How to get the text inside a label tag on a click event? | How to get the text inside a label tag on a click event?
I am trying to get the text inside the label tag on a click event of the label. Here is my code.
import React from 'react';
class Todo extends React.Component {
constructor(props) {
super(props);
this.handleOnClick = this.handleOnClick.bind... | https://stackoverflow.com/questions/46258983/how-to-get-the-text-inside-a-label-tag-on-a-click-event | javascript, reactjs | 1,505,600,810 |
se_63417647 | stackoverflow | FRONTEND_DEVELOPMENT | React/NextJS: How can I map an array of objects whose keys change? | React/NextJS: How can I map an array of objects whose keys change?
I'm working on a project in NextJS and I found an interesting problem for which I can't seem to find a solution -
I have an array of objects I've acquired from the Civic GAPI. In this array, most the objects are general election contests, but some are... | https://stackoverflow.com/questions/63417647/react-nextjs-how-can-i-map-an-array-of-objects-whose-keys-change | arrays, reactjs, dictionary, next.js | 1,597,426,945 |
se_79944167 | stackoverflow | FRONTEND_DEVELOPMENT | Next.js API route getting called multiple times in development mode | Next.js API route getting called multiple times in development mode
I am working on a Next.js application with App Router and noticed that my API route is getting called twice during development.
I have a simple fetch inside useEffect:
useEffect(() => {
fetchUsers()
}, [])
Inside fetchUsers() I call my API route:
c... | https://stackoverflow.com/questions/79944167/next-js-api-route-getting-called-multiple-times-in-development-mode | javascript, reactjs, react-strictmode | 1,779,294,287 |
se_79942554 | stackoverflow | FRONTEND_DEVELOPMENT | Inline ref cleanup throws TypeError: Cannot read properties of null during concurrent transition rollbacks | Inline ref cleanup throws TypeError: Cannot read properties of null during concurrent transition rollbacks
I recently upgraded our application to React 19 and started refactoring our legacy useEffect DOM cleanups to use the new Ref Cleanup Function feature (where callback refs can return a cleanup function).
The refac... | https://stackoverflow.com/questions/79942554/inline-ref-cleanup-throws-typeerror-cannot-read-properties-of-null-during-concu | javascript, reactjs, react-ref | 1,779,035,777 |
se_79943904 | stackoverflow | FRONTEND_DEVELOPMENT | How to create a facebook like newsfeed? | How to create a facebook like newsfeed?
I am working on a social media platform and have a feeds page, when user scroll down the feeds page we have to show the author, newsletter recommendations, currently I have hard coded this showing few posts then showing recommendation of author, then showing few more posts and ... | https://stackoverflow.com/questions/79943904/how-to-create-a-facebook-like-newsfeed | reactjs | 1,779,266,326 |
se_71464566 | stackoverflow | FRONTEND_DEVELOPMENT | Best way to include reusable SVG in React | Best way to include reusable SVG in React
I am including SVG as reusable component on my react application. Sample of SVG component is as follows
import React from 'react';
export default function IconComponent(): JSX.Element {
const svg = `
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="h... | https://stackoverflow.com/questions/71464566/best-way-to-include-reusable-svg-in-react | javascript, reactjs, typescript, svg, next.js | 1,647,244,989 |
se_57105968 | stackoverflow | FRONTEND_DEVELOPMENT | how to apply validation on mobile Number field in React js? | how to apply validation on mobile Number field in React js?
<Form.Item label="Phone Number">
{getFieldDecorator('phone', {
rules: [
{
required: true,
message: 'Please input your phone number!'
},
{
... | https://stackoverflow.com/questions/57105968/how-to-apply-validation-on-mobile-number-field-in-react-js | reactjs, validation | 1,563,513,760 |
se_76990032 | stackoverflow | FRONTEND_DEVELOPMENT | Unable to format with prettier for my monaco code editor | Unable to format with prettier for my monaco code editor
I am making a code editor in react using monaco code editor
I am trying to use prettier to format my code in the code editor.
Its giving error ' TypeError: Cannot read properties of undefined (reading 'languages')
at standalone.mjs:22:694'
This is the code
impor... | https://stackoverflow.com/questions/76990032/unable-to-format-with-prettier-for-my-monaco-code-editor | reactjs, prettier, monaco-editor | 1,693,196,576 |
se_64652891 | stackoverflow | FRONTEND_DEVELOPMENT | React Axios, Can't read the Set-Cookie header on axios response | React Axios, Can't read the Set-Cookie header on axios response
I can't read the set-cookie header on the response object in axios, I'm posting user/password to backend and the response has the authorization cookie in the Set-Cookie header, however I can't see it on the res.header object, nevertheless if I go chro... | https://stackoverflow.com/questions/64652891/react-axios-cant-read-the-set-cookie-header-on-axios-response | javascript, reactjs, cookies, axios | 1,604,349,066 |
se_62917079 | stackoverflow | FRONTEND_DEVELOPMENT | React bootstrap rounded corners for Navbar | React bootstrap rounded corners for Navbar
I've recently started teaching myself a bit about React-Bootstrap and I'm trying to get the hang of customising certain elements.
I've built this Navbar below in standard JavaScript, HTML and CSS, and I'll like to replicate the rounded corners in bootstrap, and to have the li... | https://stackoverflow.com/questions/62917079/react-bootstrap-rounded-corners-for-navbar | javascript, reactjs, navbar, react-bootstrap, rounded-corners | 1,594,822,822 |
se_70456280 | stackoverflow | FRONTEND_DEVELOPMENT | The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event | The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event
On the site I'm working on, I have a few fonts hosted on an external server. In my <head>, I preload the fonts and then retrieve the stylesheet that includes all the @font-face rules for the fon... | https://stackoverflow.com/questions/70456280/the-resource-url-was-preloaded-using-link-preload-but-not-used-within-a-few-se | javascript, html, css, reactjs, fonts | 1,640,216,728 |
se_56551026 | stackoverflow | FRONTEND_DEVELOPMENT | How to make background-image responsive in Material UI | How to make background-image responsive in Material UI
I'm trying to fix a problem with my background-image when I resize the browser. I have the background-image height on my application set to '100vh' which fills the entire page. When I resize the browser to a smaller width, the background image gets cut off. Changi... | https://stackoverflow.com/questions/56551026/how-to-make-background-image-responsive-in-material-ui | css, reactjs, material-ui | 1,560,283,555 |
se_79940262 | stackoverflow | FRONTEND_DEVELOPMENT | How to make a RSC form with server action? | How to make a RSC form with server action?
With the exciting features of RSC and server action released by React 19, we are going to use them to build a high-performance form. Here is our trying:
We build a very small client-component form.
'use client'
import { Fieldset, Form } from '@heroui/react'
import { useActi... | https://stackoverflow.com/questions/79940262/how-to-make-a-rsc-form-with-server-action | reactjs | 1,778,638,670 |
se_38036128 | stackoverflow | FRONTEND_DEVELOPMENT | GraphQL validation error | GraphQL validation error
I am trying out relay-treasure hunt tutorial but getting the following error when I run npm start. I did update my schema by running npm run update-schema.
Uncaught Error: GraphQL validation error ``Cannot query field "game" on type "Query".`` in file `/home/tharaka/My Projects/relay-treasure... | https://stackoverflow.com/questions/38036128/graphql-validation-error | javascript, reactjs, graphql, relayjs | 1,466,925,751 |
se_39094201 | stackoverflow | FRONTEND_DEVELOPMENT | React Native error: requiring unknown module | React Native error: requiring unknown module
I have been trying to load local image files in ListView.
It does work when I hard code:
return <Image source={require('./public/image1.png')} style={{width: 60, height: 60}}/>
However, it doesn't work when I read the path of the image like this:
var path = rowData.thu... | https://stackoverflow.com/questions/39094201/react-native-error-requiring-unknown-module | javascript, reactjs, react-native, reactive-programming | 1,471,935,116 |
se_61613958 | stackoverflow | FRONTEND_DEVELOPMENT | Fluent UI dropdown selection | Fluent UI dropdown selection
I am using fluent UI dropdown. So, when I click on dropdown the first option is selected by default without selecting. If I click on dropdown and without selecting if I click somewhere on the page nothing should be selected and dropdown should be closed is what I want. Please help me with ... | https://stackoverflow.com/questions/61613958/fluent-ui-dropdown-selection | reactjs, fluentui-react | 1,588,684,177 |
se_74028063 | stackoverflow | FRONTEND_DEVELOPMENT | Rich text editor in reactjs | Rich text editor in reactjs
How to create a rich text editor in Reactjs and save the value entered and show it in console/ save the value in a state and send it to php file ?
I have tried the below code but cannot save the value.
import React from 'react'
import { Editor } from "react-draft-wysiwyg";
import "../../no... | https://stackoverflow.com/questions/74028063/rich-text-editor-in-reactjs | reactjs, wysiwyg, console.log, rich-text-editor, draftjs | 1,665,490,815 |
se_51680007 | stackoverflow | FRONTEND_DEVELOPMENT | React does not recognize the `initialValue` prop on a DOM element | React does not recognize the `initialValue` prop on a DOM element
Warning: React does not recognize the `initialValue` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `initialvalue` instead. If you accidentally passed it from a parent component, rem... | https://stackoverflow.com/questions/51680007/react-does-not-recognize-the-initialvalue-prop-on-a-dom-element | javascript, node.js, reactjs, redux-form | 1,533,329,808 |
se_79941748 | stackoverflow | FRONTEND_DEVELOPMENT | Alert when the user leaves the Text Editor | Alert when the user leaves the Text Editor
i need to alert to the user when he´s going to leave the URL where i have an Text Editor.
I´m working with React + JS. I declare an state that´s change to true when the user starts typing on the Text Editor but idk how can i handle the other part | https://stackoverflow.com/questions/79941748/alert-when-the-user-leaves-the-text-editor | reactjs | 1,778,847,916 |
se_79941036 | stackoverflow | FRONTEND_DEVELOPMENT | What is the best practices for react object update for a react js | What is the best practices for react object update for a react js
I want to know about what are the best practices for React hook useState object update so not lose data and give always latest state even I use nested methods and update continuously.
When I update my state like this :
let [user, setUser] = [{ name: 'M'... | https://stackoverflow.com/questions/79941036/what-is-the-best-practices-for-react-object-update-for-a-react-js | javascript, reactjs | 1,778,756,639 |
se_71033560 | stackoverflow | FRONTEND_DEVELOPMENT | What is object Buffer in Node.js? | What is object Buffer in Node.js?
In Node.js, I have:
const fileToUpload = fs.readFileSync(test_file_path);
console.log("fileToUpload: type: ", typeof fileToUpload, ", content: ", fileToUpload);
which prints:
type: object, content: <Buffer 50 4b 03 04 14 00 08 00 08 00 78 84 cb 50 00 00 00 00 00 00 00 00 24 ae ... | https://stackoverflow.com/questions/71033560/what-is-object-buffer-in-node-js | javascript, node.js, reactjs, arraybuffer | 1,644,321,709 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.