2020欧洲杯时间表

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
2 views

Is it possible to use React for a Firefox Web Extension?

I see many chrome extensions using React. For example this one: http://github.com/wirtzdan/dynalist-highlighter Is this possible in Firefox as well? I tried to port the extension but without ...
0
votes
0answers
7 views

Typescript and React: Initializing RouteComponentProps members in React

I'm currently learning Typescript and React right now and am currently stuck on being able to access the 'match' member of props correctly. More specifically, I'm having trouble initializing the ...
-1
votes
0answers
9 views

React - CSS Styles messed up after building React App

I've seen a lot of problems alike mine, with multiple solutions as well, but none of them worked for me. I made a React app using npx create-react-app prima-prova, as shown in the official tutorial. ...
-1
votes
1answer
11 views

return in class-based components use different brackets

I used create-react-app to set up the workspace. I was trying to use a button to increment the number shown on the page. I added event handler to the button which will increment. I defined the ...
0
votes
1answer
16 views

useEffect() function runs only once, store is updated later (React hooks)

I have an application where I am fetching the store as such: const user_data = useSelector(state => state.user_data); I have a useEffect() function right after that that assigns certain state ...
0
votes
1answer
16 views

How do I import this interface from the React-Particles-JS library?

I'm trying to separate my params from my JSX in the react-particles-js library. I place my params in an Object: let options = { "particles": { "number": { "value"...
0
votes
0answers
12 views

Set Params and Headers in axios post request

I recently encounter a stupid problem in my app width an axios request. Here is the query const data = { name: name } const headers = { headers: { Authorization: `Bearer ${token}` } } axios.post('...
0
votes
0answers
8 views

Spy on function returned from 3rd party library hook

I am not able to figure out hot to spy on navigate function returned by useNavigation hook from React navigation v5. I have a simple Link component: const Link = props => { const { to, children,...
0
votes
0answers
14 views

Add active class to React Accessible Accordion

I'm new to react. Can anyone please tell how can I add an 'active' class to accordion item. I am Using React Accessible Accordion Here's my Code, Import Part import React, {Component} from 'react'; ...
0
votes
1answer
24 views

Import file dynamically from URL

Is their any way to load file content from external source at run time. const MyComponent = (props) => { const [dynamicComponent, fetchComponent] = React.useState(null); const ...
0
votes
0answers
11 views

How to render all documents from FireStore in React?

I'm building a simple page where I want to render all items from FireStore documents. However, I'm not sure what exactly FireStore provides. Is it a promise, object or something different? I used ...
0
votes
0answers
21 views

Specifying types with TypeScript, when arrays has different kinds of structure

I am kind of new to TypeScript and are trying to get rid of all any types. The problem I am now facing is in a React Component where I try to loop over an array with objects inside and extract a key/...
0
votes
0answers
12 views

How to add static property to react function component

I want to add Row and Cell as static property of Table componnet. const Table:TableType = forwardRef<HTMLTableElement, TableProps>( ({ children, ...rest }, ref) => { return ( <...
0
votes
0answers
12 views

Add env variables to react build

I am running npm run build to create a production version of my app which I upload to Netlify. On my local machine I have environment variables in a .env file. However, when I upload the build ...
0
votes
1answer
23 views

How to add all product amount in reactjs which is coming from api

I am fetching cart data from api which look something like this and I am trying to add totaAmount of all the product to display on different component Which i am unable to figure out. I component I ...

15 30 50 per page
1
2 3 4 5
13241