正规体育投注官网

Search less. Build more. Use Stack Overflow for Teams at work to share knowledge with your colleagues. Free 30 day trial. Start your trial.

Questions tagged [reactjs]

React (also known as React.js or ReactJS) is a JavaScript library developed by Facebook for building user interfaces. It uses a declarative, component-based paradigm and aims to be both efficient and flexible.

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

How to update nested mongo object

I am trying to make a report function for my app in the front end I make a put request : .put(`http://localhost:3000/api/posts/report`, { params: { ...
-1
votes
0answers
4 views

Use of localstorage instead of route params kn rea t

I have a react component that is related to route containing 1 parameter. This component contains a list of items. When i click on an item, the route changes to handle the id of the new item. When i ...
0
votes
0answers
4 views

Ionic 4 - [React] How to change active/selected IonTabButton with external buttons

I have 6 IonTabs, the first Tab has your button hidden to be a "main page". The other Tabs works normally and have a button to return to "main page"(first Tab), this button redirect to "main page" but ...
0
votes
0answers
16 views

How do I keep my state from persisting across all browsers?

I'm trying to create a simple counter app in React that keeps track across all browsers and through refreshes. Essentially a counter that anyone on the internet can interact with and effect. I've ...
0
votes
1answer
28 views

ReactJS Working with API calls - data changes everytime I use a component

For my project I'm using data from http://api.randomuser.me/ which basically returns a random person every time you fetch the data. I've created a component (for the purpose of the question I've ...
0
votes
0answers
13 views

Pass and access params in a ReactJS link

I need to pass params in a ReactJS link, and access them in the component I'm linking to. This is what I tried: In the router: <Route path="/NextComponent/:paramName" component={NextComponent}&...
-1
votes
1answer
28 views

How can I use onClick on stateless component in React?

I want to use onClick on a stateless compoenent but it's reject an error like : Expected onClick listener to be a function, instead got a value of object type. I need to show and hide a component on ...
0
votes
1answer
10 views

Fatal Error when clicking on save detail: You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop(…)

I want to click on save detail and not receive this error: You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop(…) This is my code: render(){ const{detailItem,...
0
votes
1answer
13 views

How do I set focus on component html tag

I need to set focus on tag in my functional component when it loads. I cannot make it work properly. Please help! Below is my code; Detail.js import React,{useState,useEffect} from 'react'; const ...
-2
votes
0answers
8 views

Packages to verify the re-rendering in es5 components other than “WhyDidYouRender”

Right now I'm using WhyDidYou render package to verify the re-rendering but there are few components in my repo that uses es2015. WhyDidYouRender is not working in es2015 components. Seein below error:...
1
vote
1answer
23 views

How to use React.FC<props> type when the children can either be a React node or a function

I have this sample component import React, { FC, ReactNode, useMemo } from "react"; import PropTypes from "prop-types"; type Props = { children: ((x: number) => ReactNode) | ReactNode; }; ...
0
votes
0answers
21 views

React Hooks / Unnecessary component rendering

I have a problem with unnecessary rendering basically i have a hook for a theme switch, but every time i type something in my text area i end up rendering my theme unnecessarily: basically almost all ...
0
votes
0answers
12 views

How to render articles from spefic source and prevent too many request by accident?

I am trying to make an app that shows news sources as a list and each source has a "Top headlines" link that takes the URL to "/headlines" endpoint. On that endpoint, I want to render a list of the ...
0
votes
1answer
18 views

How to get the date value from DaterRangePicker?

I'm new to React and I've come across 'react suite' which I'm currently using for the DateRangePicker component. However, I'm struggling to get the start date and end date in a format that is ...
0
votes
0answers
6 views

Asp.Net Core 2.2 or 3.1 SPA With React and Docker

I am trying two days already to containerize asp dot net core 2.2, but without any luck, I have read most than 20 articles about it, and I am not sure if it is even possible. It leads me to an error ...

15 30 50 per page
1 2 3 4 5 12665