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_64878691 | stackoverflow | FRONTEND_DEVELOPMENT | How to get the distance of a route using Bing maps API? | How to get the distance of a route using Bing maps API?
The "function" that I need is in this link, but there is no example, just a "RouteSummary Object" and the bellow there is the "distance", which is what I need.
I got the code bellow in this link
<html>
<head>
<meta http-equiv='Content-Type' content='t... | https://stackoverflow.com/questions/64878691/how-to-get-the-distance-of-a-route-using-bing-maps-api | javascript, documentation, bing-maps | 1,605,628,504 |
se_29499880 | stackoverflow | FRONTEND_DEVELOPMENT | jquery ajax https call gives ERR_INSECURE_RESPONSE | jquery ajax https call gives ERR_INSECURE_RESPONSE
I'm trying to make a https CORS AJAX call from jQuery to a Node.js process. However, whenever the call is made, Chrome complains in the console: OPTIONS https://localhost/ net::ERR_INSECURE_RESPONSE.
Looking at a similar Stack Overflow question, I should be able to ma... | https://stackoverflow.com/questions/29499880/jquery-ajax-https-call-gives-err-insecure-response | javascript, jquery, ajax, node.js, ssl | 1,428,435,525 |
se_68278858 | stackoverflow | FRONTEND_DEVELOPMENT | Is it any way to highlight text in <textarea>? | Is it any way to highlight text in <textarea>?
Is there any way to highlight text in textarea without backend code? | https://stackoverflow.com/questions/68278858/is-it-any-way-to-highlight-text-in-textarea | javascript, html | 1,625,619,671 |
se_41884969 | stackoverflow | FRONTEND_DEVELOPMENT | Highlight syntax in contenteditable | Highlight syntax in contenteditable
I have a contenteditable div I want users to type in. When users type inside the box with onkeyup, I activate a function that changes the color of certain characters:
var lTags = fixedCode.innerHTML.replace(/</gi, "<span style='color:gold;'><</span>");
var rTags = lTags.repla... | https://stackoverflow.com/questions/41884969/highlight-syntax-in-contenteditable | javascript, html | 1,485,474,083 |
se_13534389 | stackoverflow | FRONTEND_DEVELOPMENT | How would I add another not equal (!=) to this statement? | How would I add another not equal (!=) to this statement?
How would I add another not equal (!=) value to this statement?
if ($(this).data("increase_priority1") && $(this).val() != 1)
I tried reversing the syntax at the beginning of the function which determines if it is equal, but that stopped it from removing item... | https://stackoverflow.com/questions/13534389/how-would-i-add-another-not-equal-to-this-statement | javascript, if-statement, key-value, boolean-expression | 1,353,696,429 |
se_34048037 | stackoverflow | FRONTEND_DEVELOPMENT | Handling click events of links rendered within markdown React component | Handling click events of links rendered within markdown React component
I'm using React and react-marked to render markdown within a component.
The markdown content is user defined and sometime contains links.
What would be the best method of intercepting the click events on the markdown links. I could obviously us... | https://stackoverflow.com/questions/34048037/handling-click-events-of-links-rendered-within-markdown-react-component | javascript, jquery, reactjs, markdown | 1,449,074,148 |
se_26025573 | stackoverflow | FRONTEND_DEVELOPMENT | How to present wind observation with leaflet.js | How to present wind observation with leaflet.js
I'm a leaflet noob.
I have some weather data and I'd like to display it using a leaflet map, but I'm having difficulty convincing myself that what I want to do is possible. Specifically I want to compare observed wind speed and direction with the predicted wind speed and... | https://stackoverflow.com/questions/26025573/how-to-present-wind-observation-with-leaflet-js | javascript, leaflet, weather | 1,411,589,260 |
se_59068699 | stackoverflow | FRONTEND_DEVELOPMENT | "Manifest: Line: 1, column: 1, Syntax error" | "Manifest: Line: 1, column: 1, Syntax error"
I'm using Vue.js to create a Progressive Web Application (PWA) as a school project.
Whenever I host the website with Azure I get "Manifest: Line: 1, column: 1, Syntax error".
I don't have this problem on localhost …
Chrome DevTools responds with :
/manifest.json:... | https://stackoverflow.com/questions/59068699/manifest-line-1-column-1-syntax-error | javascript, json, azure, azure-web-app-service, manifest | 1,574,852,557 |
se_79533043 | stackoverflow | FRONTEND_DEVELOPMENT | Android Flavor Issue: Activity class {com.company.test/.SplashActivity} does not exist (Error type 3) | Android Flavor Issue: Activity class {com.company.test/.SplashActivity} does not exist (Error type 3)
I'm running into an issue with my React Native Android app when using flavors. The Iraqi flavor (default) builds and runs fine, but the Lebanon flavor (which uses an applicationIdSuffix) builds successfully yet fails ... | https://stackoverflow.com/questions/79533043/android-flavor-issue-activity-class-com-company-test-splashactivity-does-not | javascript, android, react-native, gradle, android-productflavors | 1,742,890,786 |
se_77883578 | stackoverflow | FRONTEND_DEVELOPMENT | Javascript new Date(); returns 1970-01-01 in Shopify Function | Javascript new Date(); returns 1970-01-01 in Shopify Function
I am working on a Shopify Function in which today's date is compared to another date.
When I run new Date(); to get today's date, it returns "1970-01-01"
I know this is epoch time, but the issue I am having is everyone says new Date(); is supposed to return... | https://stackoverflow.com/questions/77883578/javascript-new-date-returns-1970-01-01-in-shopify-function | javascript, shopify, shopify-app | 1,706,227,427 |
se_35149237 | stackoverflow | FRONTEND_DEVELOPMENT | When does iisnode create stdout log files? | When does iisnode create stdout log files?
I'm deploying my first node app and running into some issues. I am using iisnode and can see that it writes stdout log files which contain useful console logs from my app. What triggers these log files to be written? | https://stackoverflow.com/questions/35149237/when-does-iisnode-create-stdout-log-files | javascript, node.js, stdout, iisnode | 1,454,404,626 |
se_16401524 | stackoverflow | FRONTEND_DEVELOPMENT | iisnode 500.21 Handler "iisnode" has a bad module "iisnode" in its module list | iisnode 500.21 Handler "iisnode" has a bad module "iisnode" in its module list
Getting this error on Windows Server 2008 R2 64bit, IIS 7.5, iisnode 0.2.4.0, node.js 0.10.5 -
HTTP Error 500.21 - Internal Server Error
Handler "iisnode" has a bad module "iisnode" in its module list
Detailed Error Inf... | https://stackoverflow.com/questions/16401524/iisnode-500-21-handler-iisnode-has-a-bad-module-iisnode-in-its-module-list | javascript, node.js, iis, windows-server-2008, iisnode | 1,367,852,387 |
se_21390799 | stackoverflow | FRONTEND_DEVELOPMENT | How do I modify this script to scroll down? | How do I modify this script to scroll down?
I have this JavaScript:
javascript:var inputs = document.getElementsByClassName('uiButton _1sm');
for(var i=0; i<inputs.length;i++) {
inputs[i].click();
}
The user loads a Facebook page, clicks on "See All" under "Invite Your Friends to Like This Page", scrolls all the way ... | https://stackoverflow.com/questions/21390799/how-do-i-modify-this-script-to-scroll-down | javascript, facebook | 1,390,853,863 |
se_57323133 | stackoverflow | FRONTEND_DEVELOPMENT | If a function is created within a function, does it get created again every time the outer one is called? | If a function is created within a function, does it get created again every time the outer one is called?
I'd like to know if creating a function within a function (or within a loop, for that matter) would make the nested one get created over and over again. Mostly for efficiency reasons.
Some preliminary search tell... | https://stackoverflow.com/questions/57323133/if-a-function-is-created-within-a-function-does-it-get-created-again-every-time | javascript, performance | 1,564,736,384 |
se_53628147 | stackoverflow | FRONTEND_DEVELOPMENT | How to use select2 with multiple options using Razor and MVC | How to use select2 with multiple options using Razor and MVC
I am trying to create a multiple choice list using Select2, Razor and the MVC framework. My problem is that the object in the controller that receives the array input is always null. The front-end looks as follows:
<form class="form-horizontal" method="pos... | https://stackoverflow.com/questions/53628147/how-to-use-select2-with-multiple-options-using-razor-and-mvc | javascript, c#, asp.net, asp.net-mvc, jquery-select2 | 1,543,999,061 |
se_48187144 | stackoverflow | FRONTEND_DEVELOPMENT | Puppeteer won't load page | Puppeteer won't load page
I'm trying to use puppeteer to grab the requests from this page https://www.gsksaglik.com/internal-redirects.html but it seems that the page is not loaded at all because the browser won't close...
This is my code:
const puppeteer = require('puppeteer');
(async () => {
const browser =... | https://stackoverflow.com/questions/48187144/puppeteer-wont-load-page | javascript, puppeteer | 1,515,586,013 |
se_30267257 | stackoverflow | FRONTEND_DEVELOPMENT | JQuery export to excel is not working correctly | JQuery export to excel is not working correctly
I am developing a page that exports a HTML table to excel using a JQuery plugin. (https://github.com/rainabba/jquery-table2excel).
For some reason when the button is clicked absolutely nothing happens. I have identified my table, and called my function so I have no idea... | https://stackoverflow.com/questions/30267257/jquery-export-to-excel-is-not-working-correctly | javascript, c#, html, asp.net-mvc, excel | 1,431,717,745 |
se_67921779 | stackoverflow | FRONTEND_DEVELOPMENT | TensorflowJs - Rescale image with factor | TensorflowJs - Rescale image with factor
Is it possible to achieve the same Python operation in Javascript using TensorflowJs?
from tensorflow.keras.preprocessing.image import ImageDataGenerator
test_datagen = ImageDataGenerator(rescale=1./255) # NOTE: Re-scaling operation as part of the pre-processing step
I am try... | https://stackoverflow.com/questions/67921779/tensorflowjs-rescale-image-with-factor | javascript, tensorflow, opencv, tensorflow.js | 1,623,330,396 |
se_25476438 | stackoverflow | FRONTEND_DEVELOPMENT | How to make background-color of parent, the same as last-child? | How to make background-color of parent, the same as last-child?
I am looking to make a parent div change its background-color depending on the color of its child (including CSS :hover states). This is the best I could come up with, but it doesn't work...
if ($('.selector:last-child').css('background-color') == '#ddddd... | https://stackoverflow.com/questions/25476438/how-to-make-background-color-of-parent-the-same-as-last-child | javascript, jquery, background-color, parent, children | 1,408,915,252 |
se_79968168 | stackoverflow | FRONTEND_DEVELOPMENT | How to code a car shape of a F1 car moving on a track like F1 circuit | How to code a car shape of a F1 car moving on a track like F1 circuit
I want to code a F1 car moving on a F1 track, and I want the track sectors/corners to be labeled, and there should be a start/finish line, and the car should do 19 laps, and there should be a counter for that too.
I'm getting the car moving part ri... | https://stackoverflow.com/questions/79968168/how-to-code-a-car-shape-of-a-f1-car-moving-on-a-track-like-f1-circuit | javascript, java | 1,782,455,925 |
se_71185967 | stackoverflow | FRONTEND_DEVELOPMENT | How to fix spawn ENAMETOOLONG error nrwl nx workspace | How to fix spawn ENAMETOOLONG error nrwl nx workspace
I generated a week ago an angular project with nrwl/nx at that time I could generate libs and components and could start my project but right now I am getting the following error:
spawn ENAMETOOLONG
This error occurs whenever I am trying to run npm run start which... | https://stackoverflow.com/questions/71185967/how-to-fix-spawn-enametoolong-error-nrwl-nx-workspace | javascript, node.js, angular, typescript, npm | 1,645,281,442 |
se_79947497 | stackoverflow | FRONTEND_DEVELOPMENT | Trying to sync mutliple audio tracks to a movie but often gets stuck in buffering | Trying to sync mutliple audio tracks to a movie but often gets stuck in buffering
I have a one and a half hour movie that is dubbed into several languages, and each dub is 5.1 Dolby which almost has the music, sfx and voice on separate channels, which I have separated as separate files (front, center, back). I had the... | https://stackoverflow.com/questions/79947497/trying-to-sync-mutliple-audio-tracks-to-a-movie-but-often-gets-stuck-in-bufferin | javascript, audio, video | 1,779,900,452 |
se_57827085 | stackoverflow | FRONTEND_DEVELOPMENT | How do I dynamically display an icon for each category with React? | How do I dynamically display an icon for each category with React?
I am trying to set a different icon for each category I fetch from an API. But the icons I get them from my local pc.
This is probably not the best way to do it, do you have any other idea?
The props.icon gives me the Object.keys from this API URL:
h... | https://stackoverflow.com/questions/57827085/how-do-i-dynamically-display-an-icon-for-each-category-with-react | javascript, reactjs, image, dynamic, switch-statement | 1,567,795,040 |
se_79995465 | stackoverflow | FRONTEND_DEVELOPMENT | I'm getting the error The asset "./components/index.jsx.js" is not present in the asset pipeline | I'm getting the error The asset "./components/index.jsx.js" is not present in the asset pipeline
I'm getting the error The asset "./components/index.jsx.js" is not present in the asset pipeline. Error is triggered by this javascript_include_tag:
<%= javascript_include_tag 'components/index.jsx' %>
The f... | https://stackoverflow.com/questions/79995465/im-getting-the-error-the-asset-components-index-jsx-js-is-not-present-in-th | javascript, reactjs, ruby-on-rails | 1,786,840,533 |
se_60621829 | stackoverflow | FRONTEND_DEVELOPMENT | How to read the zip file contents in react application using jszip preferably | How to read the zip file contents in react application using jszip preferably
I have a requirement to read the zip file contents , This is how the zip folder will look like Manifest.zip , The files in the Manifest.zip are outline.png, publish.png, manifest.json. I need to read the manifest.json(key value pairs) on the... | https://stackoverflow.com/questions/60621829/how-to-read-the-zip-file-contents-in-react-application-using-jszip-preferably | javascript, reactjs, zip, blob, jszip | 1,583,857,360 |
se_71810492 | stackoverflow | FRONTEND_DEVELOPMENT | I need PhishTank API keys because registration for new users is temporarily disabled? | I need PhishTank API keys because registration for new users is temporarily disabled?
I want to build a real-time Phishing detection application so I need API Keys. | https://stackoverflow.com/questions/71810492/i-need-phishtank-api-keys-because-registration-for-new-users-is-temporarily-disa | reactjs, developer-tools, phishing | 1,649,526,389 |
se_79995403 | stackoverflow | FRONTEND_DEVELOPMENT | How to call Go WASM from a TypeScript React frontend? | How to call Go WASM from a TypeScript React frontend?
I am working on a web app with the following architecture:
The frontend is a React app written in TypeScript.
The "backend" is written in Go, and compiled to WASM for distribution with the frontend. (The WASM is for performance reasons.)
The Go documentation on W... | https://stackoverflow.com/questions/79995403/how-to-call-go-wasm-from-a-typescript-react-frontend | reactjs, typescript, go, webassembly | 1,786,816,433 |
se_79995376 | stackoverflow | FRONTEND_DEVELOPMENT | GSAP ScrollTrigger pinned section causes scroll position jump when opening Base UI modal dialog with Lenis smooth scrolling | GSAP ScrollTrigger pinned section causes scroll position jump when opening Base UI modal dialog with Lenis smooth scrolling
I am building a web application using Next.js (App Router, React 19), GSAP (ScrollTrigger), and Lenis for smooth scrolling.
My page has multiple sections, including a pinned story section (#story... | https://stackoverflow.com/questions/79995376/gsap-scrolltrigger-pinned-section-causes-scroll-position-jump-when-opening-base | javascript, reactjs, gsap, scrolltrigger, lenis | 1,786,805,919 |
se_68161727 | stackoverflow | FRONTEND_DEVELOPMENT | Convert Tailwind CSS classes to CSS inline style | Convert Tailwind CSS classes to CSS inline style
I'm struggling with the conversion from a React app to a react-native app. In this React app I used Tailwind CSS to stylize components thus I need to convert Tailwind CSS classes to inline CSS so that I can convert it to react native stylesheet using a tool online.
Is t... | https://stackoverflow.com/questions/68161727/convert-tailwind-css-classes-to-css-inline-style | css, reactjs, react-native, tailwind-css | 1,624,875,935 |
se_79883115 | stackoverflow | FRONTEND_DEVELOPMENT | Need to display plaintext passwords to teacher for 2nd grader accounts | Need to display plaintext passwords to teacher for 2nd grader accounts
I'm working on an amplify website which has 2 cognito account types, a teacher and students created by this teacher. These are 2nd graders who often forget passwords/have to have teacher look them up and importantly wont have a phone number or emai... | https://stackoverflow.com/questions/79883115/need-to-display-plaintext-passwords-to-teacher-for-2nd-grader-accounts | reactjs, amazon-cognito, aws-amplify, password-encryption | 1,770,243,415 |
se_45702518 | stackoverflow | FRONTEND_DEVELOPMENT | React hidden navigation menu | React hidden navigation menu
I am working with ReactJS at the moment (I am very much a beginner). What I wanting to do is show/hide a menu component when a link is clicked in the site navigation. The menu is being built as a component that sits within a component (header).
The user clicks the menu button and that th... | https://stackoverflow.com/questions/45702518/react-hidden-navigation-menu | javascript, reactjs | 1,502,836,214 |
se_48881704 | stackoverflow | FRONTEND_DEVELOPMENT | Is it possible to insert form into each row in table using Ant.design? | Is it possible to insert form into each row in table using Ant.design?
I'm using React + Ant.design and I need to make a table where each row will be a form with a number of inputs which are represents fields of this row and user can edit value in each field and push Save at the end of each row.
But I have no idea ho... | https://stackoverflow.com/questions/48881704/is-it-possible-to-insert-form-into-each-row-in-table-using-ant-design | javascript, twitter-bootstrap, reactjs, antd | 1,519,118,574 |
se_58583114 | stackoverflow | FRONTEND_DEVELOPMENT | How to use jest to mock out a private variable | How to use jest to mock out a private variable
I am trying to write a unit test for a function like this:
export class newClass {
private service: ServiceToMock;
constructor () {
this.service = new ServiceToMock()
}
callToTest () {
this.service.externalCall().then(()=> {
//Code t... | https://stackoverflow.com/questions/58583114/how-to-use-jest-to-mock-out-a-private-variable | reactjs, typescript, unit-testing, jestjs | 1,572,208,242 |
se_79995072 | stackoverflow | FRONTEND_DEVELOPMENT | Why does my vanilla JavaScript debounce create multiple timers when used inside a React component? | Why does my vanilla JavaScript debounce create multiple timers when used inside a React component?
I am trying to implement my own debounce function without using Lodash.
My initial debounce function looks like this:
function debounce(fn, delay) {
let timer;
return function (...args) {
clearTimeout(timer);
... | https://stackoverflow.com/questions/79995072/why-does-my-vanilla-javascript-debounce-create-multiple-timers-when-used-inside | javascript, reactjs | 1,786,708,540 |
se_76689520 | stackoverflow | FRONTEND_DEVELOPMENT | Can Shadcn ui be installed for Vite + React with javascript and not typescript? | Can Shadcn ui be installed for Vite + React with javascript and not typescript?
I am having trouble installing and using shadcn components on mt vite + react + tailwind project. i tried following the guide in their documentation here. It seems that it requires typescript for it to work?
I tried to:
Create a React Jav... | https://stackoverflow.com/questions/76689520/can-shadcn-ui-be-installed-for-vite-react-with-javascript-and-not-typescript | reactjs, typescript, tailwind-css, vite | 1,689,351,597 |
se_74456448 | stackoverflow | FRONTEND_DEVELOPMENT | node module not found .MODULE NOT FOUND | node module not found .MODULE NOT FOUND
node app.js
node:internal/modules/cjs/loader:998
throw err;
^
Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\app.js'
at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
at Module._load (node:internal/modules/cjs/loader:841:27)
... | https://stackoverflow.com/questions/74456448/node-module-not-found-module-not-found | javascript, html, reactjs, node.js | 1,668,582,540 |
se_79657434 | stackoverflow | FRONTEND_DEVELOPMENT | Issue with trying to focus textarea on doubleClick | Issue with trying to focus textarea on doubleClick
(i'm using wails golang framework that uses native webview)
I want my textarea to focus on double click for that i have the component below
[Ignore the setIsEditing its just for css]
-> The textarea is readOnly by default.
Expected behaviour: on double click, the read... | https://stackoverflow.com/questions/79657434/issue-with-trying-to-focus-textarea-on-doubleclick | javascript, reactjs, typescript, wails | 1,749,345,693 |
se_79005531 | stackoverflow | FRONTEND_DEVELOPMENT | Dynamic server usage: Page couldn't be rendered statically because it used `headers` | Dynamic server usage: Page couldn't be rendered statically because it used `headers`
CODE
Page component:
import React from 'react';
import PricingPlansMain from '@/components/pages/PricingPlansPage';
import { getMeAction } from '@/server/auth-actions';
import { getAgentPricingPlansAction } from '@/server/payment-... | https://stackoverflow.com/questions/79005531/dynamic-server-usage-page-couldnt-be-rendered-statically-because-it-used-head | reactjs, next.js, next.js13, nextjs14 | 1,726,814,457 |
se_79493246 | stackoverflow | FRONTEND_DEVELOPMENT | How to customize LinearProgress color in Material UI | How to customize LinearProgress color in Material UI
I have set a theme for my codebase using createTheme like so:
import { createTheme } from '@mui/material/styles';
export default function getTheme() {
return {
theme: createTheme({
palette: {
...,
progress: {
0: '#000000',
... | https://stackoverflow.com/questions/79493246/how-to-customize-linearprogress-color-in-material-ui | javascript, reactjs, next.js, material-ui | 1,741,373,725 |
se_78412193 | stackoverflow | FRONTEND_DEVELOPMENT | Getting a "failed to resolve import prop-types from path-here. Does this file exist?" error | Getting a "failed to resolve import prop-types from path-here. Does this file exist?" error
I'm using npm run dev to start a local webserver.
This is the full error:
[plugin:vite:import-analysis] Failed to resolve import "prop-types" from "src/components/MyComponent.tsx". Does the file exist?
D:/projects/mul... | https://stackoverflow.com/questions/78412193/getting-a-failed-to-resolve-import-prop-types-from-path-here-does-this-file-ex | reactjs, typescript, vite | 1,714,542,500 |
se_79993722 | stackoverflow | FRONTEND_DEVELOPMENT | Creating a component through useState used in another useState created component, not working | Creating a component through useState used in another useState created component, not working
I have a web application which has popups shown depending on the user clicks. For the popups, I have a custom Component class, and to implement it, I add it as an array useState([]) inside the main page as "{popups}".
The abo... | https://stackoverflow.com/questions/79993722/creating-a-component-through-usestate-used-in-another-usestate-created-component | reactjs | 1,786,606,118 |
se_79993655 | stackoverflow | FRONTEND_DEVELOPMENT | Why is response.data returning undefined even though the POST request is successful? | Why is response.data returning undefined even though the POST request is successful?
I am working with ReactJS, ExpressJS, and MongoDB.
I made a POST request using the axios.post() method, and it successfully completed the task, returning a promise in a fulfilled state. The promise contains the data sent by the backen... | https://stackoverflow.com/questions/79993655/why-is-response-data-returning-undefined-even-though-the-post-request-is-success | reactjs, mongodb, express, axios, promise | 1,786,586,982 |
se_53887173 | stackoverflow | FRONTEND_DEVELOPMENT | Jest mock the same function twice with different arguments | Jest mock the same function twice with different arguments
I'm new to JEST and I'm currently testing a Javascript component that makes an API call in its onComponentDidMount. Depending on the return data of the ajax call (api call) my component either display a table or a simple text.
My JEST test are fairly simple, ... | https://stackoverflow.com/questions/53887173/jest-mock-the-same-function-twice-with-different-arguments | javascript, reactjs, jestjs | 1,545,405,694 |
se_74754076 | stackoverflow | FRONTEND_DEVELOPMENT | Cannot read properties of null (reading 'useReducer') when I build my next.js application in Server Side Render page | Cannot read properties of null (reading 'useReducer') when I build my next.js application in Server Side Render page
I just build a next.js application in that I use react context and react reducer to authenticate users and this is my context code:
import React from "react";
import { createContext, useContext,... | https://stackoverflow.com/questions/74754076/cannot-read-properties-of-null-reading-usereducer-when-i-build-my-next-js-ap | reactjs, react-hooks, next.js, use-reducer | 1,670,684,808 |
se_70899604 | stackoverflow | FRONTEND_DEVELOPMENT | SWC with JavaScript: How to handle CSS imports and how to absolute imports? | SWC with JavaScript: How to handle CSS imports and how to absolute imports?
Summary
How can you tell SWC to compile CSS files imported in React components?
How can you tell SWC to compile absolute imports in tests and in React components?
Here is a minimal reproducible example.
Context
We're migrating from Babel to... | https://stackoverflow.com/questions/70899604/swc-with-javascript-how-to-handle-css-imports-and-how-to-absolute-imports | javascript, css, reactjs, absolute-path, swc-compiler | 1,643,399,914 |
se_59657030 | stackoverflow | FRONTEND_DEVELOPMENT | Calculate number images in a row to fit container while keeping aspect ratio | Calculate number images in a row to fit container while keeping aspect ratio
I want to create a masonry horizontal layout like this library. It contain collection of images with different height and width each other.
The layout can have one or more rows, as long as it meets this criteria:
Row width fit to the mason... | https://stackoverflow.com/questions/59657030/calculate-number-images-in-a-row-to-fit-container-while-keeping-aspect-ratio | javascript, reactjs, algorithm, logic, masonry | 1,578,542,230 |
se_79987549 | stackoverflow | FRONTEND_DEVELOPMENT | What is the difference between link wrapping and 'use client' in Next.js? | What is the difference between link wrapping and 'use client' in Next.js?
Let's suppose we have two scenarios:
Link wrapping
<Link href="/voice_monitor" passHref legacyBehavior>
<Button component="a">Go to Voice Monitor</Button>
</Link>
use client
'use client';
import Link from 'next/link';
import { Butto... | https://stackoverflow.com/questions/79987549/what-is-the-difference-between-link-wrapping-and-use-client-in-next-js | javascript, reactjs, next.js | 1,785,252,405 |
se_78220249 | stackoverflow | FRONTEND_DEVELOPMENT | Tailwind Merge with Colors on Text and Text Shadows | Tailwind Merge with Colors on Text and Text Shadows
No Longer an Issue
Tailwind v4 introduced the text-shadow utility class, so this question is no longer relevant, unless working on outdated software. Just migrate to v4 and your life will be easier.
tl;dr I have a text-shadow utility class in my tailwind.config.ts t... | https://stackoverflow.com/questions/78220249/tailwind-merge-with-colors-on-text-and-text-shadows | javascript, css, reactjs, next.js, tailwind-css | 1,711,381,480 |
se_55522179 | stackoverflow | FRONTEND_DEVELOPMENT | How to wrap input text? | How to wrap input text?
I have a React table written with material-ui like this:
import React from "react";
import PropTypes from "prop-types";
import { withStyles } from "@material-ui/core/styles";
import Table from "@material-ui/core/Table";
import TableBody from "@material-ui/core/TableBody";
import TableCell from... | https://stackoverflow.com/questions/55522179/how-to-wrap-input-text | reactjs, material-ui, word-wrap, html-input | 1,554,400,217 |
se_67597604 | stackoverflow | FRONTEND_DEVELOPMENT | "Directory in the roots[0] option was not found" | "Directory in the roots[0] option was not found"
I am trying to set up monorepo to run all of its Jest tests at once. In each package, I'm using react-app-rewired to get Babel to transpile code imported from other packages without ejecting from create-react-app, as described in this article.
react-app-rewire... | https://stackoverflow.com/questions/67597604/directory-in-the-roots0-option-was-not-found | reactjs, jestjs, monorepo, react-app-rewired | 1,621,403,247 |
se_71260776 | stackoverflow | FRONTEND_DEVELOPMENT | Google Maps Free API for NGO project | Google Maps Free API for NGO project
I'm building a React app and I would like to use Maps. Google Maps and other Maps APIs have a charge and this project will be free for the community (just like an NGO) so no budget at all.
In this app there is a page to create an Event, so you can type many things and where the Eve... | https://stackoverflow.com/questions/71260776/google-maps-free-api-for-ngo-project | reactjs, react-native, google-maps, maps | 1,645,760,533 |
se_79299654 | stackoverflow | FRONTEND_DEVELOPMENT | AWS Amplify React App Deployment giving false 404 in console when refreshing paging | AWS Amplify React App Deployment giving false 404 in console when refreshing paging
I am testing a deployment of a Web App on AWS Amplify and am getting a false 404 reply in console even though the page is showing correctly when you trigger a refresh from the browser.
Format for all routes show absolute path such as ... | https://stackoverflow.com/questions/79299654/aws-amplify-react-app-deployment-giving-false-404-in-console-when-refreshing-pag | reactjs, routes, http-status-code-404, aws-amplify | 1,734,795,211 |
se_54515567 | stackoverflow | FRONTEND_DEVELOPMENT | custom ag-grid-filter using dropdown for filtering particular column using react-redux | custom ag-grid-filter using dropdown for filtering particular column using react-redux
I am working on a project which requires ag-grid-filter outside with dropdown which will filter out the result of one column.
I have tried to do this using react and redux form.
<select id="ddl" className="custom-select" onChange=... | https://stackoverflow.com/questions/54515567/custom-ag-grid-filter-using-dropdown-for-filtering-particular-column-using-react | reactjs, redux, react-redux, ag-grid, ag-grid-react | 1,549,281,374 |
se_55082515 | stackoverflow | FRONTEND_DEVELOPMENT | How to reduced the particular row height in React table/react checkbox table | How to reduced the particular row height in React table/react checkbox table
I am using React table with checkbox property and wanted to reduced the default react table row height, so that 20 row can fit in table.
Piece of code:
Column defined structure:
function getColumns() {
const columns = [
{ Header: "Fr... | https://stackoverflow.com/questions/55082515/how-to-reduced-the-particular-row-height-in-react-table-react-checkbox-table | reactjs | 1,552,169,872 |
se_79991373 | stackoverflow | FRONTEND_DEVELOPMENT | Why currentUser below is empty while currentUser above is not? | Why currentUser below is empty while currentUser above is not?
I run a login form; upon completion, I store the userId and navigate to the Home page. In App.jsx, I retrieve the userId, and if I don't have one I display the Login page. I am successfully retrieving the stored userId, yet my ProtectedRoute reports that t... | https://stackoverflow.com/questions/79991373/why-currentuser-below-is-empty-while-currentuser-above-is-not | javascript, reactjs, zustand | 1,786,115,241 |
se_65883631 | stackoverflow | FRONTEND_DEVELOPMENT | Material-UI DataGrid Component Refresh with new State Data | Material-UI DataGrid Component Refresh with new State Data
Good morning,
We are using Material-UI to create a DataGrid table filled with users and want to be able to delete selected entries (checkbox) using a button.
Clicking the button updates the state of our object (removing the expected rows) and the DataGrid elem... | https://stackoverflow.com/questions/65883631/material-ui-datagrid-component-refresh-with-new-state-data | javascript, reactjs, datagrid, material-ui | 1,611,573,178 |
se_55393226 | stackoverflow | FRONTEND_DEVELOPMENT | Disable hydration / only partially hydrate a Next.js app | Disable hydration / only partially hydrate a Next.js app
Is it possible to enforce an SSR-only mode in Next.js and only partially hydrate the page? Let's say I have this app:
components/dynamic.jsx
export default () => (
<button onClick={() => console.log("I have been clicked")}>Click me</button>
)
pages/index.jsx
... | https://stackoverflow.com/questions/55393226/disable-hydration-only-partially-hydrate-a-next-js-app | reactjs, next.js, hydration | 1,553,762,378 |
se_79980493 | stackoverflow | FRONTEND_DEVELOPMENT | Changing code causes hydration issue Next.js/Turbopack | Changing code causes hydration issue Next.js/Turbopack
Is there a fix for this? I have been struggling with this hydration issue.
Refer to the image, as you can see. I simply added a new className, and the hydration shows.
It seems like when I change code, it will cause hydration Issue, comparing the previous code to ... | https://stackoverflow.com/questions/79980493/changing-code-causes-hydration-issue-next-js-turbopack | reactjs, next.js, hydration | 1,783,995,090 |
se_64167915 | stackoverflow | FRONTEND_DEVELOPMENT | Password show/hide using Eye/EyeSlash in React | Password show/hide using Eye/EyeSlash in React
I am trying to implement eye/eyeslash in on my Register form in React.
This is a function that's is responsible for changing visibility type and eye icon changing.
import React, { useState } from "react";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
... | https://stackoverflow.com/questions/64167915/password-show-hide-using-eye-eyeslash-in-react | reactjs | 1,601,624,906 |
se_71277485 | stackoverflow | FRONTEND_DEVELOPMENT | Preflight CORS error followed by 404 error | Preflight CORS error followed by 404 error
I am experiencing an issue when trying to get data from API for my react app.
I am trying to pass protect my API using htaccess file so when trying to send auth in Axios get request I receive a CORS error and 404 error.
This is my axios GET request:
getData = async () => {
... | https://stackoverflow.com/questions/71277485/preflight-cors-error-followed-by-404-error | php, reactjs, .htaccess, cors, authorization | 1,645,886,151 |
se_50824181 | stackoverflow | FRONTEND_DEVELOPMENT | Preloading Google Fonts | Preloading Google Fonts
Light House audit is suggesting that I preload key requests, specifically the two google fonts that I'm using in my React app. A Light House member suggested using:
<link rel="preload" as="style" href="https://fonts.googleapis.com/css?family=Open+Sans|Roboto:700" crossorigin>
<link rel="precon... | https://stackoverflow.com/questions/50824181/preloading-google-fonts | javascript, html, css, reactjs, lighthouse | 1,528,830,433 |
se_50464777 | stackoverflow | FRONTEND_DEVELOPMENT | Testing functions with arguments in React with Jest Enzyme | 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 = this.state.appliedFilterList[filterType].includes(filterName);
if (filterApplied) {
... | https://stackoverflow.com/questions/50464777/testing-functions-with-arguments-in-react-with-jest-enzyme | javascript, reactjs, tdd, jestjs, enzyme | 1,526,982,937 |
se_26416334 | stackoverflow | FRONTEND_DEVELOPMENT | React Error: Target Container is not a DOM Element | React Error: Target Container is not a DOM Element
I just got started using React, so this is probably a very simple mistake, but here we go. My html code is very simple:
<!-- base.html -->
<html>
<head>
<title>Note Cards</title>
<script src="http://<url>/react-0.11.2.js"></script>
<!-- <script src="http... | https://stackoverflow.com/questions/26416334/react-error-target-container-is-not-a-dom-element | javascript, django, dom, reactjs | 1,413,507,791 |
se_79991193 | stackoverflow | FRONTEND_DEVELOPMENT | React.lazy permanently caches a failed dynamic import — how can I retry a route chunk without reloading? | React.lazy permanently caches a failed dynamic import — how can I retry a route chunk without reloading?
Every route in my SPA is code split with React.lazy. If a route's chunk fails to download because
the device went offline, that route stays permanently broken for the lifetime of the document, and
the "Retry" butto... | https://stackoverflow.com/questions/79991193/react-lazy-permanently-caches-a-failed-dynamic-import-how-can-i-retry-a-route | reactjs, vite, chunks, react-error-boundary | 1,786,071,686 |
se_79991081 | stackoverflow | FRONTEND_DEVELOPMENT | How to test PlateJs Marks with React Testing Library | How to test PlateJs Marks with React Testing Library
I can't seem to be able to make this work.
My Editor:
const editor = usePlateEditor({
plugins: [...BasicMarksKit, PlainTextPastePlugin],
value: initialValue,
});
<Plate editor={editor} onValueChange={saveContent}>
<RichTextControls />
<EditorContainer onKey... | https://stackoverflow.com/questions/79991081/how-to-test-platejs-marks-with-react-testing-library | javascript, reactjs, jestjs, react-testing-library, slate.js | 1,786,033,029 |
se_65134661 | stackoverflow | FRONTEND_DEVELOPMENT | NextJs useEffect triggers every time I route | NextJs useEffect triggers every time I route
I am building a nextjs blog app.
In the current blog layout, I managed to fetch data on my sidebar (I need it to show my "recent posts" there) using the useEffect/fetch (because getInitialProps works only under Pages) but it triggers whenever I route between pages. (it goes... | https://stackoverflow.com/questions/65134661/nextjs-useeffect-triggers-every-time-i-route | javascript, reactjs, next.js | 1,607,032,081 |
se_63597028 | stackoverflow | FRONTEND_DEVELOPMENT | React-Quill - addRange(): The given range isn't in document | React-Quill - addRange(): The given range isn't in document
I am trying to make a simple blog using React-Quill text editor. I want to get the value of the ReactQuill Editor and preview it on a different route. I've been trying to achieve this since quite a while now and each time I face the same issue, the quill ... | https://stackoverflow.com/questions/63597028/react-quill-addrange-the-given-range-isnt-in-document | reactjs, react-router, quill, react-quill | 1,598,442,635 |
se_69054825 | stackoverflow | FRONTEND_DEVELOPMENT | How should I implement lazy loading for my images in react? | How should I implement lazy loading for my images in react?
I'm trying to add lazy loading to my react application as I have over 200 images that I don't need on the initial load. If I lazy load the images, does this mean, they won't be loaded until they're needed on the screen?
I'm currently importing 4 groups of abo... | https://stackoverflow.com/questions/69054825/how-should-i-implement-lazy-loading-for-my-images-in-react | reactjs, lazy-loading | 1,630,754,736 |
se_64098303 | stackoverflow | FRONTEND_DEVELOPMENT | Auto-fit MUI `AutoComplete` width to the selected option (value) | Auto-fit MUI `AutoComplete` width to the selected option (value)
I want to implement an AutoComplete field using Material UI, where the size of the field resizes according to the option selected.
When the option selected does not occupy the entire field, I would like the size of the field to reduce. And if the option... | https://stackoverflow.com/questions/64098303/auto-fit-mui-autocomplete-width-to-the-selected-option-value | reactjs, autocomplete, material-ui | 1,601,280,703 |
se_76977678 | stackoverflow | FRONTEND_DEVELOPMENT | How to Dynamically Change Favicon for Dark and Light Mode in Next.js 14 or 15? | How to Dynamically Change Favicon for Dark and Light Mode in Next.js 14 or 15?
I am working on a Next.js 14 application using App Router and I'd like to dynamically change the favicon based on the user's color scheme preference (dark or light mode). Currently, I have a black-colored favicon and a white-colored favicon... | https://stackoverflow.com/questions/76977678/how-to-dynamically-change-favicon-for-dark-and-light-mode-in-next-js-14-or-15 | reactjs, next.js, next.js13 | 1,692,970,170 |
se_64387940 | stackoverflow | FRONTEND_DEVELOPMENT | react-table: change background color of rows depending upon row props value | react-table: change background color of rows depending upon row props value
I have a situation where I have to change background color of rows depending upon row props. I am currently doing this:
const getTrProps = (state, rowInfo, instance) => {
if (rowInfo) {
return {
style: {
... | https://stackoverflow.com/questions/64387940/react-table-change-background-color-of-rows-depending-upon-row-props-value | javascript, reactjs, react-table, react-table-v6 | 1,602,846,360 |
se_76773084 | stackoverflow | FRONTEND_DEVELOPMENT | Using Webpack module federation to load remote React app gives TypeError: fn is not a function | Using Webpack module federation to load remote React app gives TypeError: fn is not a function
I am developing microfrontend using Webpack 5 Module Federation.
My host app is an Angular project. My remote app is an React. Both are using Typescript.
My setup is like following:
The React (remote) project
In React projec... | https://stackoverflow.com/questions/76773084/using-webpack-module-federation-to-load-remote-react-app-gives-typeerror-fn-is | reactjs, webpack, micro-frontend, webpack-module-federation, angular-module-federation | 1,690,386,981 |
se_37295377 | stackoverflow | FRONTEND_DEVELOPMENT | how to navigate from one page to another in react js? | how to navigate from one page to another in react js?
I have two components. In first component I have one button. On click of button I want to navigate to another component or another page.
here is my code
http://codepen.io/naveennsit/pen/pymqPa?editors=1010
class App extends React.Component {
handleClick(){
... | https://stackoverflow.com/questions/37295377/how-to-navigate-from-one-page-to-another-in-react-js | javascript, reactjs, react-router | 1,463,563,454 |
se_69646893 | stackoverflow | FRONTEND_DEVELOPMENT | useSWRInfinite - getKey function always gets pageIndex as 1 | useSWRInfinite - getKey function always gets pageIndex as 1
I am using the SWRInfinite example as defined here (https://github.com/vercel/swr/discussions/732) and here (https://swr.vercel.app/examples/infinite-loading).
My code is as below...
import React from 'react'
import {useSelector} from 'react-redux'
import us... | https://stackoverflow.com/questions/69646893/useswrinfinite-getkey-function-always-gets-pageindex-as-1 | javascript, reactjs, swr | 1,634,736,453 |
se_72287585 | stackoverflow | FRONTEND_DEVELOPMENT | Refresh power bi client acces Token React | Refresh power bi client acces Token React
I use power bi client to import visuals created by power bi into a web application
the integration of the visuals is perfect and I can consult all my dashboards
but my problem is that these dashbords stay only one hour and if we want to see them again on the web application we... | https://stackoverflow.com/questions/72287585/refresh-power-bi-client-acces-token-react | reactjs, powerbi, powerbi-embedded | 1,652,870,196 |
se_56485409 | stackoverflow | FRONTEND_DEVELOPMENT | Is there a way to return React Component as string instead of object? | Is there a way to return React Component as string instead of object?
I want to introduce a multilingual system.
I have a function component that returns a translation of a specific element based on selected language (from Context API).
Everything works well until I put the translated element into the form (option va... | https://stackoverflow.com/questions/56485409/is-there-a-way-to-return-react-component-as-string-instead-of-object | javascript, html, reactjs, forms, placeholder | 1,559,857,063 |
se_71914378 | stackoverflow | FRONTEND_DEVELOPMENT | partially(conditionally) dashed line | partially(conditionally) dashed line
In my React project, I am using Rechrts, and I need a Line in my graph but it has to be dashed (strokeDasharray) after some point. So solid for the beginning and then dashed after some conditions.
I searched a lot but couldn't find a solution, is it even possible? | https://stackoverflow.com/questions/71914378/partiallyconditionally-dashed-line | reactjs, recharts | 1,650,298,932 |
se_62220653 | stackoverflow | FRONTEND_DEVELOPMENT | Having issues fetching Google Map | Having issues fetching Google Map
I'm having issues fetching Google Map, it says the page can't load correctly, I also have some errors on my console. I don't understand what I'm doing wrong, I should be able to make a query and have the places showing in the suggestions, but I'm doing something wrong. Here is my comp... | https://stackoverflow.com/questions/62220653/having-issues-fetching-google-map | javascript, reactjs, google-maps, error-handling, fetch-api | 1,591,376,838 |
se_62792224 | stackoverflow | FRONTEND_DEVELOPMENT | How to use react-router useHistory hook with TypeScript | How to use react-router useHistory hook with TypeScript
In my func component I am trying to use history.push in this way:
import React, { useEffect } from 'react';
import { useHistory } from 'react-router-dom';
interface Props {
question: Question;
selectedAnswer: SelectedOption | undefined;
}
const LastScreen: ... | https://stackoverflow.com/questions/62792224/how-to-use-react-router-usehistory-hook-with-typescript | reactjs, react-router, react-hooks | 1,594,202,411 |
se_79950873 | stackoverflow | FRONTEND_DEVELOPMENT | How do I generate SEO-friendly meta tags in React? | How do I generate SEO-friendly meta tags in React?
I'm developing a React-based website and want to improve its SEO performance. Since React applications often render content on the client side, I'm looking for the best way to manage dynamic meta tags for different pages.
Specifically, I need to:
Set unique page titl... | https://stackoverflow.com/questions/79950873/how-do-i-generate-seo-friendly-meta-tags-in-react | javascript, reactjs, seo | 1,780,494,037 |
se_61109496 | stackoverflow | FRONTEND_DEVELOPMENT | Why doesn't my svg in react-native show any shadow? | Why doesn't my svg in react-native show any shadow?
The Problem:
I have a react native project which uses react-native-svg for importing my logos. I created my custom Bottom Tab Bar with react-navigation and it looks like this:
So the problem is just I exported my svg when it looks like this in my adobe xd file (... | https://stackoverflow.com/questions/61109496/why-doesnt-my-svg-in-react-native-show-any-shadow | reactjs, react-native, svg | 1,586,377,811 |
se_70858817 | stackoverflow | FRONTEND_DEVELOPMENT | Module parse failed getting error in webpack | Module parse failed getting error in webpack
I am working on webpack in react, when i run this command npx webpack --config webpack.config.js , i am getting below error
ERROR in ./node_modules/react-toastify/dist/ReactToastify.css 1:0
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to ha... | https://stackoverflow.com/questions/70858817/module-parse-failed-getting-error-in-webpack | reactjs, webpack, node-modules | 1,643,173,037 |
se_74995699 | stackoverflow | FRONTEND_DEVELOPMENT | Google Pay Error: API Unable to download payment manifest | Google Pay Error: API Unable to download payment manifest
When I load my website I get this error:
Unable to download payment manifest "https://pay.google.com/about/".
This errors shows up indefinitely and eventually crashes the website. It happened when I developed my own code using the Docs. It happened also when I ... | https://stackoverflow.com/questions/74995699/google-pay-error-api-unable-to-download-payment-manifest | javascript, reactjs, google-pay | 1,672,761,559 |
se_65184798 | stackoverflow | FRONTEND_DEVELOPMENT | How to pass additional data to getserversideprops from another page in Nextjs? | How to pass additional data to getserversideprops from another page in Nextjs?
I want to pass projectID from the previous page(/projects) to the (/project/[projectName]). Therefore, in order to fetch a project details, i have to fire an API endpoint with projectID.
What is the right way to pass projectID from the prev... | https://stackoverflow.com/questions/65184798/how-to-pass-additional-data-to-getserversideprops-from-another-page-in-nextjs | reactjs, next.js, server-side-rendering | 1,607,355,809 |
se_71519465 | stackoverflow | FRONTEND_DEVELOPMENT | Deleting a TSX file throws TypeScript error | Deleting a TSX file throws TypeScript error
After deleting any .tsx file I see this error:
TS1208: 'MyFile.tsx' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement to make it a module.*
I've tried restarting VS Code, res... | https://stackoverflow.com/questions/71519465/deleting-a-tsx-file-throws-typescript-error | reactjs, typescript | 1,647,554,087 |
se_72115304 | stackoverflow | FRONTEND_DEVELOPMENT | Error: Refused to load the script because it violates the following Content Security Policy directive: "default-src 'none'" | Error: Refused to load the script because it violates the following Content Security Policy directive: "default-src 'none'"
I have a React + Node.js app that works fine on localhost but runs into errors when deployed to Heroku, resulting in a 404 response status.
This is one of the console errors I g... | https://stackoverflow.com/questions/72115304/error-refused-to-load-the-script-because-it-violates-the-following-content-secu | node.js, reactjs, heroku, http-status-code-404, content-security-policy | 1,651,676,847 |
se_72505817 | stackoverflow | FRONTEND_DEVELOPMENT | Using waxjs to get information about NFTs in Wax Cloud Wallet - possible? | Using waxjs to get information about NFTs in Wax Cloud Wallet - possible?
I'm trying right now to integrate the Wax Cloud Wallet into my React/NextJS App.
For that, I'm using waxjs and the documentation here.
Right now, the User can log in to his account and the app receives the account name and two public keys. But I... | https://stackoverflow.com/questions/72505817/using-waxjs-to-get-information-about-nfts-in-wax-cloud-wallet-possible | javascript, reactjs, next.js, blockchain, atomicassets | 1,654,417,435 |
se_53904556 | stackoverflow | FRONTEND_DEVELOPMENT | react-share image not showing when shared | react-share image not showing when shared
in my all my share-buttons my images are not showing just the url
in my my public folder html header
<meta content="`%PUBLIC_URL%/${picture.jpg}`">
<meta property="og:description" content='' />
and in my details component i am using react-helmet t dynamically put t... | https://stackoverflow.com/questions/53904556/react-share-image-not-showing-when-shared | reactjs, react-share | 1,545,576,472 |
se_44331168 | stackoverflow | FRONTEND_DEVELOPMENT | npm - EPERM: operation not permitted on Linux | npm - EPERM: operation not permitted on Linux
I'm trying to do the react tutorial on my local machine (centOS)
I ran
sudo npm install -g create-react-app
After running that command I got the following error
npm ERR! Linux 3.10.0-514.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "create-re... | https://stackoverflow.com/questions/44331168/npm-eperm-operation-not-permitted-on-linux | node.js, linux, reactjs, npm, npm-install | 1,496,413,180 |
se_57751593 | stackoverflow | FRONTEND_DEVELOPMENT | How do I force a page reload on Hooks state change? | How do I force a page reload on Hooks state change?
I'm using react hooks and need to do a page refresh on state change.
I tried using window.location.reload() but this doesn't result in a proper refresh.
const responseGoogle = async googleData => {
await userLogin(googleData);
setLoggedIn(true);
window.... | https://stackoverflow.com/questions/57751593/how-do-i-force-a-page-reload-on-hooks-state-change | reactjs, react-hooks | 1,567,400,177 |
se_63311224 | stackoverflow | FRONTEND_DEVELOPMENT | Material-table - if no data show message | Material-table - if no data show message
I am using material-table https://material-table.com/#/docs/get-started. However I can't seem to find any information about showing a default message if no data is returned?
How could I go about this? Below is the test table I have created (with fake data). Now if that data is ... | https://stackoverflow.com/questions/63311224/material-table-if-no-data-show-message | reactjs, material-ui, material-table | 1,596,853,222 |
se_65363718 | stackoverflow | FRONTEND_DEVELOPMENT | react router v6 how to navigate to route | react router v6 how to navigate to route
Beginner question ReactJs and router V6 and I learn react-router-dom and now I can't seem to navigate to another path/page
I have these routes:
const routes = [
{
path: 'app',
element: <DashboardLayout />,
children: [
{ path: 'account', e... | https://stackoverflow.com/questions/65363718/react-router-v6-how-to-navigate-to-route | reactjs, react-router-dom | 1,608,324,470 |
se_79989442 | stackoverflow | FRONTEND_DEVELOPMENT | Is it possible to remove the use of useEffect or are they unavoidable? | Is it possible to remove the use of useEffect or are they unavoidable?
I think that useEffect can be avoided here. Essentially what we are doing is to persist the state in query params, so whenever the user clicks on a node we change the query param (nodeid) and the other thing is if the user shares this URL with othe... | https://stackoverflow.com/questions/79989442/is-it-possible-to-remove-the-use-of-useeffect-or-are-they-unavoidable | reactjs | 1,785,493,215 |
se_79986423 | stackoverflow | FRONTEND_DEVELOPMENT | React use() cache gets overwritten by an older Promise after invalidation | React use() cache gets overwritten by an older Promise after invalidation
I am using React 19.2 with Vite.
I am playing around with a small Promise cache for React 19 use() and I cannot figure out the best way to handle this.
So I start with one request and it takes 1.5 seconds. Before it finishes I delete the cache e... | https://stackoverflow.com/questions/79986423/react-use-cache-gets-overwritten-by-an-older-promise-after-invalidation | javascript, reactjs, caching, promise | 1,785,181,410 |
se_79965903 | stackoverflow | FRONTEND_DEVELOPMENT | Accessible pattern for a clickable row card that contains nested interactive elements (checkbox, buttons, icons) | Accessible pattern for a clickable row card that contains nested interactive elements (checkbox, buttons, icons)
Problem
I have a molecule-level component, a task row card, that behaves like a clickable container (clicking the row opens a detail side panel), but it also contains several nested interactive elements:
A... | https://stackoverflow.com/questions/79965903/accessible-pattern-for-a-clickable-row-card-that-contains-nested-interactive-ele | html, reactjs, accessibility, wcag, sonarcloud | 1,782,222,861 |
se_46747507 | stackoverflow | FRONTEND_DEVELOPMENT | How can I print something on the client console from a react component? | How can I print something on the client console from a react component?
I do not know if I gave myself to understand for example in the file server / main.js place something like this
Meteor.startup (() => {
console.log ('where am I');
// example of collection and map
});
and you can see the message bu... | https://stackoverflow.com/questions/46747507/how-can-i-print-something-on-the-client-console-from-a-react-component | reactjs, meteor, console | 1,508,002,971 |
se_64172923 | stackoverflow | FRONTEND_DEVELOPMENT | compilerOptions.paths must not be set (alias imports are not supported) | compilerOptions.paths must not be set (alias imports are not supported)
I'm trying to map paths in tsconfig.json to get rid of relative paths hell. My React App is based on Create-React-App.
I tried this SO thread and added paths in my tsconfig.json. My tsconfig.json is as
{
"compilerOptions": {
"baseUrl": "src"... | https://stackoverflow.com/questions/64172923/compileroptions-paths-must-not-be-set-alias-imports-are-not-supported | reactjs, typescript, tsconfig, tsconfig-paths | 1,601,647,510 |
se_70315059 | stackoverflow | FRONTEND_DEVELOPMENT | How to return to the same scroll position when going back using useNavigate() or useLocation() react-router | How to return to the same scroll position when going back using useNavigate() or useLocation() react-router
When clicking on a specific pokemon, the user can show details of the pokemon. When the user clicks the back button to see all pokemon, I want them to continue in the exact same scroll position/pokemon, where th... | https://stackoverflow.com/questions/70315059/how-to-return-to-the-same-scroll-position-when-going-back-using-usenavigate-or | reactjs, react-router, react-router-dom, pokeapi | 1,639,224,935 |
se_41950119 | stackoverflow | FRONTEND_DEVELOPMENT | Filter table data by date with Reactjs | Filter table data by date with Reactjs
I am new to reactJs and trying to implement the below idea -
A data table where data can be filtered by day of the month.
A calendar which will show only days of a month in a row (pagination/tab like view):
Selecting each days will filter the data of the table on the page
Nex... | https://stackoverflow.com/questions/41950119/filter-table-data-by-date-with-reactjs | reactjs, filter, datatable, calendar | 1,485,839,732 |
se_79925469 | stackoverflow | FRONTEND_DEVELOPMENT | Should I migrate from a React SPA (using React Helmet for SEO) to Next.js and split the project into a marketing site (SEO) and an authenticated app? | Should I migrate from a React SPA (using React Helmet for SEO) to Next.js and split the project into a marketing site (SEO) and an authenticated app?
I have a React application built as a client-side SPA.
For SEO, I am using react-helmet to set page titles, meta descriptions, and Open Graph tags per route.
The problem... | https://stackoverflow.com/questions/79925469/should-i-migrate-from-a-react-spa-using-react-helmet-for-seo-to-next-js-and-sp | reactjs, next.js, seo | 1,776,180,382 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.