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.

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

Adding NextJS Link element throws runtime error

I am starting out with NextJS and ran into an issue with routing / linking between pages. As soon as I add a Link tag to my code, the server throws the following error: Unhandled Runtime Error Error: ...
-1
votes
0answers
12 views

How can I compare if the inputs are empty or not of an object within an array

Im trying to loop an array and compare if all objects values are not empty, in case of all inputs(object value) are not empty go to next step, otherwise show error. Clicking on 'Agregar' Button should ...
0
votes
0answers
10 views

How to filter a simple table/array in REACT

im searching for a way to easily filter and maybe sort the following table. I tried filtering it with {data.getInteressentListing.edges.filter(node.name => node.name.includes('J')).map(({node}...
0
votes
0answers
21 views

How to send events in one button form

I need to send event to backend with isVerified true/false depending on last condition but i can either have just one button form. How can i do it? <form onSubmit={(ev) => this.submit(ev, '...
0
votes
0answers
9 views

Style of defining React HOC components

So, in my React app, I see the following pattern for defining HOCs; export function withMyApi() { // Extra function wrapper to allow for clear place for configs. Plus, you can compose multiple HOCs ...
0
votes
0answers
4 views

NextJS: After production if we reload the dynamic url redirecting to homepage

After uploading to server the dynamic routings are not working after reload of page, its redirecting to Homepage. In local its working fine
0
votes
0answers
12 views

React .map update on state change [duplicate]

I realise this may be a really simple explanation/answer to this but it's driving me mad. I've got a React component that maps over a state and displays each item in the array as a p tag, but when I ...
0
votes
1answer
10 views

React / Redux - setting initial state with useRouteMatch

Im using functional approach in my react project and im having an <App> component, <List> component and <Item> component (hierarchical). My redux store has items and date state. <...
0
votes
0answers
13 views

useSprings with TypeScript

function getDefaultOrder(items: any[]): number[] { return items.map((_, index) => index); } type SpringsHandler<T> = (index: number) => T; type SpringValues = { zIndex: number, y: ...
2
votes
0answers
19 views

Smoothening the header transition upon scroll in ReactJS static web application

im new to React JS. Anyhow I able to create the following Web App of my own. My code works as I needed but with an small issue. The header shrink and expansion occur in a rough manner. The process ...
0
votes
0answers
15 views

I need to add a logger when electron close unexpectedly. | Electron | Logger | React.js |

Please anyone can help me to add a logger when the electron close unexpectedly. The main point I need a log file in my project directory. And don't want to upload log files inside the server. I need a ...
0
votes
0answers
22 views

MongoDB database didn't save data

I'm tried to save my data in mongoDB, but there is a problem I have faced do not saved my data always run error condition. here is save query code: blog.save((err, data) => { if (err) { ...
-1
votes
0answers
14 views

Styled Components Invalid hook call - React

My styled div: const ProgressBar = ({ value, max, color, width }) => { return ( <Container color={color} width={width}> <progress value={value} max={max} data-...
0
votes
1answer
13 views

React hook stale closure: setState only triggers twice in callback function of a subscription

I' trying to build a toast message API for React. My goal is to provide a fireNotification() api that can be called anywhere in the app and have React render the toast component. I built this simple ...
0
votes
1answer
13 views

Jest call default mock from a file

I have this code on my test: //app.test.js jest.mock('notistack', () => ({ useSnackbar: jest.fn(), })); jest .spyOn(notistack, 'useSnackbar') .mockImplementation(() => ({ enqueueSnackbar }...

15 30 50 per page
1
2 3 4 5
19498
久草视频新免费_日韩视频一中文字暮_欧美三级片