9,302 questions
Advice
2
votes
5
replies
92
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 ...
1
vote
1
answer
45
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 ...
1
vote
1
answer
109
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 ...
0
votes
0
answers
33
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 ...
0
votes
1
answer
90
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 ...
0
votes
1
answer
37
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',
...
0
votes
0
answers
59
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 ...
1
vote
1
answer
46
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 ...
0
votes
1
answer
65
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 ...
0
votes
1
answer
187
views
rspack builtin:swc-loader jsx compilation error
I'm using rspack to bundle my app. Im getting error in the build process while compiling my js/jsx components.
Here my rspack rule config
{
test: /\.(js|jsx)$/,
loader: 'builtin:swc-loader',
...
-2
votes
1
answer
80
views
React and Django DRF [closed]
The backend works, when i test it with an http file. and directly at the endpoint.
POST http://localhost:8000/api/products/ HTTP/1.1
Content-Type: application/json
Authorization: Bearer ...
1
vote
4
answers
106
views
Why does the input field lose focus after typing a character unless I add autofocus, but still the whole page reloads?
I have an input field that loses focus and reloads the entire page after every letter added, and when I add an autofocus the page maintains focus but still reloads the page. How do I fix this?
...
2
votes
1
answer
221
views
How to dynamically compile a directory of mdx files before each vite build?
I'm using React and Vite for a project I'm working on.
What I currently need to do is compile and render all of the MDX files in a directory but I don't want to do the actual compilation on the client ...
0
votes
1
answer
62
views
After scrolling to the top/bottom , content is partially hidden
{/* Requests List with Scroll */}
<div className="overflow-y-auto" style={{ height: 'calc(100% - 150px)', paddingBottom: '20px' }}> {/* Adjusted height and added padding-bottom ...
3
votes
1
answer
296
views
How can I convert a string to null OR number with Zod?
I have a select like this:
<select>
<option value="null">Select a option</option>
<option value="1">Apple</option>
<option value="2"&...