Questions tagged [reactjs]

React is a JavaScript library for building user interfaces. It uses a declarative, component-based paradigm and aims to be both efficient and flexible.

0 votes
0 answers
4 views

Postgres API returning html instead of json

I have a React app running Express querying a remote Postgres instance. I've set up some API routes to return data. When running locally, the data is returned as application/json, however when ...
user avatar
0 votes
0 answers
12 views

Do not repeat tags

On my site, I'm using TagsInput, which allows the user to enter data into an input field, hit the enter button, and see it displayed as tags. But I have one problem: the user can enter data with the ...
user avatar
  • 167
0 votes
0 answers
7 views

How to build a references structure object as components mount in React

I want to create an object of references of the following html structure: <div id="root"> <div>Child 1 <div>GrandChild 1</div> <div>GrandChild 2&...
user avatar
0 votes
0 answers
5 views

object Response // object Object on async request

(At the end you'll find the function) I am trying to query my api and in the console I get this response. res: [object Response] body: [object Object] If I do JSON.stringify(res) I get an empty object....
user avatar
0 votes
0 answers
16 views

My reactJs code prints a value twice in console when using console.log

Making my first project in react but getting console printed twice. import axios from 'axios'; export default function App() { const [searchText ,setSearchText]=useState(""); console....
user avatar
0 votes
0 answers
6 views

How to solve vulnerabilities(breaking changes) issue while installing npm packages?

I'm trying to clone my old reactjs project from github to local system and facing vulnerabilities issues while installing npm packages using npm install. I tried npm audit fix and npm audit fix --...
user avatar
0 votes
0 answers
16 views

what exactly React.FC means [duplicate]

Hi i have seen one application and in component they have written like below, I have seen this type first time, Can anyone tell me what ecactly React.FC is interface ILayout { scrollable?: boolean ...
user avatar
  • 529
0 votes
0 answers
3 views

Test attributes value of html element managed by React Helmet with Testing Library React

I'm trying to write a test for a component which adds meta information about internationalization to my document. For doing so, I use React Helmet. The component looks like this: import { Helmet } ...
user avatar
  • 7,577
0 votes
0 answers
4 views

Is there any solution to integrate PayPal to React Native App?

I have a Website which built by using React.js and it has integrated with PayPal successfully. Also, I am gonna convert it to React Native App (iOS and Android). Website version used "@paypal/...
user avatar
  • 83
0 votes
1 answer
20 views

get a state from another component

I have a Map component with a state. const [userPickPos, setUserPickPos] = useState() This state represents a marker's position on a map. This Map component is returned in a page component. On this ...
user avatar
0 votes
0 answers
9 views

How to make authorized "post" request strapi graphql apollo nextjs

I am building an ecommerce website using strapi, apollo, graphql, nextjs, when an authenticated users ordering they need to send jwt token using headers but I am little confused how to do that. Here ...
user avatar
-1 votes
0 answers
11 views

React - TypeScript - Multi-dimensional Object - Need Support

I have an object like below. I need to remove the particular section of array object only. I need to remove this based on some condition. Please provide some suggestions on this. Can we use single ...
user avatar
0 votes
1 answer
23 views

How to remove 'null' from an array?

I receive a response from the backend that gives me an array of language, which one is default, but the two other languages comes with different varibales.(Also need to split them in order to take the ...
user avatar
  • 55
0 votes
0 answers
22 views

Reactjs - generating array dynamically breaks unique code results

I'm trying to make a clone of wordle but more dynamic. I have a normal working version but it is limited in the sense of characters and word length. Im trying to remove these restrictions... In my ...
user avatar
0 votes
1 answer
26 views

how to customize material ui icon by adding plus

I'm using material ui icons, is there any way to add plus to icons ? This is my icon : import ApartmentIcon from '@mui/icons-material/Apartment'; and that icon should have plus to it like here: I ...
user avatar
  • 309

15 30 50 per page
1
2 3 4 5
26560