Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
31 views

Styling block diagrams in the react-simple-flowchart library

Good day. When developing the project, I faced the task of creating a diagram, for this the react-simple-flowchart library was used. Now the task is to stylize the elements of the block, that is, you ...
Denys Kravchenko's user avatar
0 votes
0 answers
31 views

InfiniteScroll component from react js not firing next function

In the following component we show the messages when loading the page for the first time using the useEffect (fetchData), and theoretically when scrolling to the end of the page it would have to ...
Victor Fernandez's user avatar
2 votes
0 answers
40 views

Element type is invalid: expected a string - but the import implementation seems correct

frontend\src\components\CronJobTable.js: import React, { useState } from 'react'; import { Table, Button, Form, InputGroup, Col } from 'react-bootstrap'; function CronJobTable() { const [cronJobs, ...
shau's user avatar
  • 33
0 votes
0 answers
103 views

Error creating payment intent: StripeAuthenticationError

As you can imagine I'm currently setting up the payment API with using Stripe. Problem is, I've never done such thing before and am following the docs pretty much one by one. This the payment.jsx code:...
Yosef Elsersy's user avatar
0 votes
0 answers
23 views

I want to edit a specific row in database

[userList.jsx](https://i.sstatic.net/19EbJ.png), [EditUser.jsx](https://i.sstatic.net/6GyU8.png), [backend.js](https://i.sstatic.net/Dsx38.png) I want to update the data in my database using a form ...
Bhat Suhail's user avatar
-1 votes
1 answer
57 views

Does not display any words in browser

Here some images for you to check { Does not show any word Even in Inspect Console there's no error shown Code in app.js: import React from "react"; import{ BrowserRouter, Routes, ...
muhammed_'s user avatar
-1 votes
2 answers
219 views

How to stream an AI.JSX response with Node.js Express

I am writing a small REST API with Node.js and Express, and I'm using AI.JSX with the OpenAI API. The AI.JSX docs provide an example of how to use SSE to stream a response within the context of a Next....
oliakaoil's user avatar
  • 1,679
3 votes
1 answer
6k views

SyntaxError: Unexpected token '<' at ModuleLoader.moduleStrategy

When running my main script.js file (which imports other js / jsx files using import) I had an initial error of: Cannot use import statement outside a module which I was able to fix by adding: "...
Mandy 's user avatar
  • 31
1 vote
2 answers
41 views

Something wrong with my React UseParam & node.js code

I was trying to connect server and client code. But I have few problems, my url my cosole.error I was able to get userid from chrome console, but I can't get any other data from /:userid, (GET http://...
levi's user avatar
  • 11
0 votes
1 answer
37 views

REACT - I'm trying to store an image from a file type input, but it doesn't store the path in the database

I'm trying to store an image from a file type input, but it doesn't store the path in the database, follow the code below along with the error I get. I am storing the images in a folder in the code ...
Felipe Kreulich's user avatar
1 vote
0 answers
290 views

How to use Async Server Component with honojs?

const app = new Hono() const AsyncCommponent = async () => { await new Promise((resolve) => setTimeout(resolve, 1000)); return <h1>Hello from async</h1>; } app.get('/', (c) => ...
RuslanGlaznyov's user avatar
1 vote
0 answers
72 views

Rendering fonts using font file in InDesign Server

I am working with the InDesign server to render different templates. It uses a rendering (.jsx) script and data merge approach to render the indesign templates. Currently, I want to apply custom user ...
Umair Khalid's user avatar
1 vote
1 answer
49 views

The buttons on my hero section are not displaying (ReactJS)

I'm writing a web application and need a simple UI. I was following a bunch of different tutorials and taking what I needed. I worked on the navbar successufully and have it displaying and buttons ...
aditya patel's user avatar
6 votes
2 answers
10k views

What is the best way to render component by condition in React?

I have a component that needs to render by condition, I'm confused between the two ways like the code below and I am figuring out the recommended way of React. What is the best way to set render ...
Epple's user avatar
  • 954
-1 votes
1 answer
82 views

I'm getting an error in console Module not found

import React from 'react' import './sidebar.css' import logo from './assets/' const sidebar = () => { return ( <div className='sideBar grid'> <div className='...
sakshi's user avatar
  • 1
1 vote
1 answer
36 views

Why this shows error while installing any packages? [closed]

Whenever I install any package with this command npm install then output comes with errors,Here You can See (https://i.sstatic.net/1duiK.jpg)
Mayur thakkar's user avatar
3 votes
2 answers
2k views

Connection Refused problem when testing outside localhost on react and express

i'm currently working on some kind of order system using react for the frontend(port 3000) and express(port 3001) for the backend. Everything works like a charm as long as i test it on the same ...
MichaelS114's user avatar
0 votes
1 answer
64 views

How can i solve this form validation problem in react jsx?

I'm trying to do a validation form in react but I'm having a lot of problems since I added saving user data for registration. import React, { useState } from "react"; import "./...
uptogigi's user avatar
1 vote
1 answer
113 views

Can't update state in React via key event

I'm making a calculator with React, when I click the divs they trigger a function to update the state which goes into the display output of the calculator, I have no problem at all doing this with ...
David98761324's user avatar
0 votes
2 answers
247 views

Indesign render script need to target TextFrames within Rectangle objects

I am working on InDesign rendering script (.jsx) for rendering template (.indd) using InDesign Server (Version: 17.2). In my InDesign templates, there are Rectangle ([object Rectangle]) items, that ...
momin naveed's user avatar
0 votes
0 answers
75 views

how to download vitejs with low internet connection

recently I newed my windows so vite js got deleted. I tried to reinstall it but due to bad network connection and filterings from iran government I cant download.I tried many vpns but didnt get it ...
Ali sanaei's user avatar
2 votes
2 answers
7k views

Build form submission handler using API Route in Astro JS framework

I am trying to Build a form submission handler for JS-free form submission. But the api is not receiving the data sent by the html form. I am following this documentation. The signin.json.js file ...
KayD's user avatar
  • 826
1 vote
1 answer
34 views

How to add the component which allows adding an article to a list

I need to add the ListArticle component which allows adding an article to a list. import React, { useState } from "react"; export default function ListArticle() { const [id, setId] = ...
wiam leo's user avatar
0 votes
1 answer
254 views

How to execute JSX file in vanilla JS with Babel

I want to import a JSX file in vanilla JS and execute it so that I get an actual Component object. I tried to do this with Babel, but it only gives me code as a string, it doesn't execute it. I don't ...
exoRift's user avatar
  • 787
0 votes
3 answers
50 views

Save a specific value from an array of object and store them individually into another state to get the sum ReactJS

In addition to this question I am trying to map individually a state to another state to store the amountToPay object to get the sum of it. The problem is every time it renders the onChange function. ...
dape's user avatar
  • 43
0 votes
0 answers
28 views

Node Js role in React application during development [duplicate]

I am a beginner to Web development technologies. Recently I have started learning React. When I started my hands-on in React, I was told to install Node js in my machine and later started building the ...
Desai Vibha's user avatar
0 votes
2 answers
498 views

Cannot update a component while rendering a different component)

Im using React 18, React Router 6 and React Auth Kit 2.7 I tried to do login page, as showed in example for RAK link But i getting this error Code for Login Component JSX import React from "...
bogdan-byte's user avatar
0 votes
2 answers
52 views

How to return multiple function in react in JSX format

I'm trying to return a few functions in react but I'm unable to perform as I wanted. return ( loadingMessage(), errorMessage(), loginForm(), performRedirect() ) } I want to ...
Noor 's user avatar
  • 89
-3 votes
1 answer
59 views

nothing is visible in router react [closed]

the following code is not showing any content on the web screen/page import './App.css'; import Navbar from "./components/Navbar.jsx"; import Tef from './components/Tef'; import About from '....
Divyansh undley's user avatar
0 votes
2 answers
2k views

Cannot read properties of undefined (React)

I have an issue with my code, i have a search input and a list of countries When i type some words i have an error which cause to my app collapse I've been trying for about two days to find the ...
Yovel Hadad's user avatar
0 votes
0 answers
55 views

How to refactor huge if-statement chain with multiple math expression

I have a snippet of perfectly running code but it's ugly and clunky, I'm looking for a more efficiently compressed if-statement for it //my code function func_tion() { let someval_1 = this.x; let ...
Felix Gorczany's user avatar
1 vote
1 answer
1k views

Can't get react app created with Shopify CLI to run locally (on Heroku)

For reference, here is the file structure of the app: project │ README.md │ shopify.app.toml | Dockerfile | heroku.yml | package.json | package-lock.json │ └───web │ │ index.js │ │ ...
Jacob's user avatar
  • 243
2 votes
1 answer
2k views

Importing JSX with ESM Dynamic Imports in Node.js

Summary of problem I'm exclusively using ESM in my Node.js project and trying to find a way to dynamically import JSX. I'm making a custom static site generator for my website and want to render React ...
Mercuriel's user avatar
0 votes
0 answers
31 views

setState | componentDidMount not updating correctly - react-views

I am having a lot of trouble with componentDidMount() and setState. from what I can tell setState is updating since I am able to print the results within my getData function, but I am not able to ...
user123's user avatar
  • 99
1 vote
2 answers
2k views

TypeError: Cannot read properties of undefined (reading 'map') in React-Views

I am stuck on this error and I cannot figure out what I am doing wrong, from what I have figured out it looks like my list of objects is empty but that doesn't make any sense since I am able to log it ...
user123's user avatar
  • 99
2 votes
0 answers
467 views

Error: error:0308010C:digital envelope routines::unsupported Node.js v18.04.0

I tried starting my first project in React and everything kinda worked fine, but I realized that there were warnings showing all the time in the console so I used the command npm audit fix --force, ...
SlothOnCrack's user avatar
2 votes
1 answer
953 views

Can we use JSX in a NodeJS backend to build XML?

In the frontend, React uses JSX to render the HTML of its components. Is JSX (or similar) functionality available in a NodeJS backend, specifically to render (conditional) XML? Currently we use ...
Thijmen's user avatar
  • 446
5 votes
3 answers
5k views

Compiling React component with rollup is returning webpack error

I'm trying to compile a React jsx components throught Rollup.js to fill my components library in commonjs. This is my rollup configuration import peerDepsExternal from 'rollup-plugin-peer-deps-...
Ugo Lfe's user avatar
  • 767
4 votes
2 answers
8k views

TypeScript Type for HTML Element Tag

I am working on a TypeScript + React project. For a component, I want to use the polymorphic as prop. However, I want to restrict it to HTML tags so it will not accept ReactNodes or JSX Elements. But ...
DoomageAplentty's user avatar
0 votes
3 answers
204 views

Access useState variable inside useEffect

I'm new with Node.js and I'm having some troubles understanding it's logic. I created a page with few SELECT elements. The options for each SELECT are loaded from server with axios. Then user selects ...
white_n_fluffy's user avatar
0 votes
1 answer
1k views

Why my javaScript code in not working with my react Component?

I cannot add client-side javaScript into my React App component (LeftSection.js). Can anyone please tell me what is wrong with my code? The one possible answer is that I am adding my javaScript code ...
Harshit Jain's user avatar
-1 votes
1 answer
1k views

How to display Mongo data in Front End in MERN

I am working in MERN Stack and i am stuck at a part where i have to display the data of MongoDB compass on the Web page in a designed way i am able to display all the data on the web page by using the ...
ABHI SHEK's user avatar
0 votes
1 answer
98 views

What metrics does CSS use when not specifying it when changing size?

I noticed when I use style in div or any other elements, without specifying size metrics. It uses one sizing. But when I use class and also do not specify metrics of size then it uses completely other ...
Karina Shulan's user avatar
2 votes
1 answer
526 views

(NodeJS) Google Drive API - Folder listing modifiedTime

How do I get the date of the last time a folder on google drive has been updated. For an example, when the last file was copied into it. Currently I'm using the following code to get back the date ...
imim's user avatar
  • 63
0 votes
1 answer
588 views

'Row' cannot be used as a JSX component. Its instance type 'Row' is not a valid JSX element. TS2786

I am new to Typescript and working on a project started by someone else. Is this a version issue or some other issue with the code? I am using Node version v14.19.11. Although the application loads ...
Ranopriyo Neogy's user avatar
0 votes
1 answer
42 views

Using if statements in JSX

I am making a mobile app, I have a list of dictionaries like var userMessagesSent = [ {sentBy: "user", content: "Hello universe"}, {sentBy: "user", ...
Araf's user avatar
  • 27
0 votes
2 answers
3k views

React - Access the state of a parent from the children, without nested function

Hello, I am coming to you today for the first time because I have not found a solution to my problem. I have been using react for a few weeks, Don't be too cruel about the quality of my code 😁. ...
Hardel's user avatar
  • 33
0 votes
5 answers
271 views

If statement in Jsx render based on data

Whats simplest way to write a if statement in jsx when its based on data your receiving how can i check the other code at the same time-if that makes sense? so if its not "P" then i want to ...
kkongkk's user avatar
  • 107
8 votes
4 answers
15k views

How to use document and window element in astro JS?

I want to use window or document to return path of the current page default Astro.site.pathname isn't working right or proper documentation isn't available. My question is how to use document or ...
Manish Shahi's user avatar
0 votes
1 answer
2k views

NextJS application, stuck on can not read property of undefined (reading setState) within a method

I have bound the method to this within the constructor. I have also used the arrow function trick to try and get this to work properly. However, I keep getting this error: Unhandled Runtime Error ...
Chase Quinn's user avatar