9,288 questions
Score of -1
-1
votes
1 answer
1
answer
112 views
112
views
CSS adaptive to JS condition [closed]
I am currently building a weather app with Vite and React.
At the moment, the background photo is just a sunny clear sky, and the ad is styled in white and blue around that.
What I want to do is to ...
Score of -1
-1
votes
0 answers
0
answers
115 views
115
views
React tutorial code shows blank page when I run it
I'm working through this React tutorial. I'm stuck on Chapter 4 - Getting Started with React. When I run this sample code, the browser just shows a blank page:
<html>
<body>
<div ...
Advice
0
votes
1
replies
73
views
Using ipapi to get ip address
I am running the following code:
import {useEffect, useState} from "react";
import axios from "axios";
function ObterIP() {
const [ip, setIP] = useState("");
...
Best practices
0
votes
2
replies
137
views
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 [...
Best practices
0
votes
1
replies
63
views
Authentication flow between razor(.cshtml) and.jsx
I'm getting a 302 status code.
Upon investigation, I found that it is likely the login button doesn't send a request to the server at all, hence the status code.
Score of 1
1
vote
1 answer
1
answer
127 views
127
views
SVG Divider flex container not matching height of input in React
I am building a Hero Section in React app and creating a search bar with a dropdown, input field and a vertical divider between them.
The search box is a flex container. I want the vertical divider(...
Advice
2
votes
5
replies
125
views
JSX Backend Framework: a Joke or a Problem Solver?
I’ve been experimenting with a way to make backend architecture as visual and readable as a React frontend.
A Joke : This was a Joke against the huge mess that the misusage of server actions in React ...
Score of 1
1
vote
1 answer
1
answer
58 views
58
views
Unable to update data in redux toolkit
I'm making a CRUD app using Redux Toolkit. It includes all the basic operations, but the Update operation doesn't work as expected. Please take a look at the following code.
postSlice.js
export const ...
Score of 1
1
vote
1 answer
1
answer
117 views
117
views
Incrementing a number inside a shared component
I am working on a project converting academic coursework in Markdown to MDX. This Markdown can feature footnotes.
The MDX-generated component tree contains <sup>n</sup> elements linking ...
Score of 0
0
votes
0 answers
0
answers
55 views
55
views
How do I crop my image in .jsx so that my image is not 'cut off'
I have an image with the dimensions: 8192 X 12288 px.
I want to crop the image into these dimensions: 5400 x 7200 px.
Result 1 -
In Photoshop, using the crop tool, it does it like so (left image).
It ...
Score of 0
0
votes
1 answer
1
answer
111 views
111
views
MUI - Round border radius FormControl
I have a FormControl which currently looks something like this:
Now the problem is in the image below, the label Username is getting set at the edge due to the borderRadius which is making the label ...
Score of 0
0
votes
1 answer
1
answer
44 views
44
views
How does it work to update a draft but keep it as a draft on the same id? Strapi and react
While the draft I would like to edit does get sent with the redirect to the edit page, it keeps giving me a not found error.
output
Draft in Edit:
{id: 5,
documentId: 'uqmaazyp3zb01az41s0sfzbm',
...
Score of 0
0
votes
0 answers
0
answers
65 views
65
views
How to replace basecolor image in a psd file
Now I have a Photoshop .psd file with a 3D Layer with the following Texture options:
My Photoshop document's 3D layer
English translation
I want to batch replace the image-file used for the Base Color ...
Score of 1
1
vote
1 answer
1
answer
50 views
50
views
useState on multiple image load events doesn't save all values
I'm trying to save a value to state for each loaded image in my gallery, using the image's native onLoad event to call a custom handler function.
handleImageLoad is indeed fired for each image and ...
Score of 0
0
votes
1 answer
1
answer
85 views
85
views
window.addEventListener("beforeunload", callback) nulls out hook state values when webpage refresh is used - need to close a pop-up window
Use window.addEventListener("beforeunload", xxx) within a function call with the intent of having programmatic functionality before the user refreshes the page or navigates away. In this ...