Questions tagged [reactjs]

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

0
votes
0answers
8 views

Why isn't my component re-rendering or my mapstatetoprops not working?

I have a simple React Native app with Redux. When I try to connect my application state to my redux state, it is working. But when I map my redux state to the props, it is not working. My redux-dev-...
0
votes
0answers
8 views

nodejs react app in specific folder of server

i have one site which is basically php but i have recently developed one app in nodejs and react and everything is working in localhost. i wanted to deploy and thought it will be just easy but found ...
0
votes
0answers
5 views

How to have navigation transition like native iOS app using React PWA?

I would like to build a PWA app using create-react-app. Paying $99 dollar per year for my previous mobile app is too costly and I need more economic solution. Therefore I choose PWA as the ...
1
vote
0answers
20 views

How can I delete a button in a cell and replace it with a text/number?

I'm preparing a react-table and there is a column of buttons. When clicked, there is another column that updates according to the row number that was clicked. I want to remove the separate column to ...
0
votes
0answers
7 views

How can I change a source of a video in react?

I have used a react-video component in my reactjs web application and it's working with a default source link, but when I'm using my video as a source, nothing happens. I have searched a lot, read ...
1
vote
0answers
7 views

Redux Forms for Creating and Editing

I am working with redux-form. I need to create a new user and update the user's information using the same form. I've made the required form to create a new user right now, but I don't know how to ...
0
votes
0answers
12 views

How can i refactor this translation (withLocalize) code to be used from one file?

I'm using React.js Webpack, react-redux; I'v got this code duplicated in some components over the app, And i'm wondering if there is any way that i can set this code in one place instead of ...
0
votes
0answers
7 views

EdgeGrid in React to access the Akamai Fast Purge API v3

I want to make an API call to the Akamai Fast Purge API (https://developer.akamai.com/api/core_features/fast_purge/v3.html) in a React application. However, the authorization is rather hard to get a ...
0
votes
0answers
5 views

React - testing components

I should start with implementing tests for my React application. Root project folders consists of components, containers, reducers, actions, helpers, views etc. I assume, only containers and ...
0
votes
0answers
20 views

Is it okay to pass a HOC via React context?

I have a task to create a new React component in an existing project. The project is composed from several sub-projects. Two of them are: WebApp: contains the most of application logic, Redux store, ...
-1
votes
0answers
24 views

adding one event listener within another, and waiting for dom to fully load

I have a class with a map marker which, when clicked, opens a pop up window which contains a button on it (which says "reserve"). I know that I can use document.addEventListener("DOMContentLoaded",...
0
votes
0answers
29 views

How to fix only one “undefined” prop when passing props to a child component in react

I'm doing a project in React and find this problem suddenly when trying to pass props to a child component. The strange is that just one prop return "undefined", the others returns the expected values....
0
votes
0answers
8 views

I have problem with filtering data in React-Table, after submit filter, one collumn with separate component won't update

I have problem with filtering data in React-Table, after submit filter, one column with separate component won't update. On filter submit, last column in react-table always render as is without ...
0
votes
2answers
26 views

Add a <LineBreak /> component within block code

I have this small component that renders attachments' names. I would want to add a line break between each attachment name, I have a <LineBreak /> component but I'm not sure what's the right ...
0
votes
0answers
7 views

Duplicate tasks are being displayed even though only one document is being added to firebase

I'm using react-redux-firebase to create a task manager. When a task is created, a user fills out a form and this data is used to add a document to my todo collection in firebase. So we have a ...
-1
votes
1answer
26 views

Facing problems with passing down props in ReactJs

I'm having a hard time passing down props to a component. I want to be able to use that object in componentDidMount Method. My current setup is i have an App component that is passing down an object ...
0
votes
1answer
42 views

Passing children in react

this is my first time to develop a react application. I wanted to display 5 buttons in a table. The first approach I did is to hardcode it in Table.js Table.js <Button hidden={...
0
votes
0answers
16 views

how to fix validate some values in material ui table in reactjs and to validate some newly added table values

I'm doing a mini task on React.js in that I have used material UI table and gave values through states and I wrote a onChange handler to edit that states. If I click edit button all the states are ...
0
votes
2answers
35 views

Custom shape for border radius image in React-Native

I want to reproduce that style in my component (the border bottom). I am basically loading a rectangular image, then I want to rounded it at the bottom. I think about : border-bottom-right-radius ...
1
vote
2answers
22 views

How to write handlers and other functions in functional components

I have a functional component (which previously was class-based but I decided to refactor it with react hooks). So now every function which is declared inside will be declared on every rerender (In ...
0
votes
1answer
20 views

React getting Maximum update depth exceeded error

I'm performing a change password, for authError I'm getting the following error.. Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate ...
0
votes
1answer
19 views

React router Link is changing the url but not actually redirecting

I am using react-router. And it's working fine, But If I just change the :id in url, it doesn't redirect the page <Route path="/school/:id" component={School}/> e-g: If am already at school ...
0
votes
0answers
7 views

CRA + SASS custom fonts only load in local

I'm trying to use custom fonts using import with create-react-app and sass but I'm running into a weird problem. When I run my code in local, the fonts get bundled and loaded properly. However, when ...
-4
votes
0answers
15 views

What's is node package can create loop table?

i'm writing a UI by react JS. Request is a need to display a table with totally 100s rows. At a time, body of table will showing 10 rows, after 5 second, body will automatic slide to next 10 rows. Did ...
0
votes
0answers
12 views

How to store or hide sensitive credentials in electron.js application

I'm making an electron application along with create-react-app for the frontend. The application requires an active MQTT connection. So, somewhere in my electron code, i have to include the ...
0
votes
0answers
13 views

Display a collapsable folder/file tree structure based on array/json object in React/Javascript

I want to build and display a collapsable tree structure in a react project that is created based on an array object that I get as a response from a backend endpoint call. I want to take the complex ...
-1
votes
0answers
14 views

show HTML Response of api in react

My react Application open in an IFrame. A third party API returns an HTML page code in response which i have to show in my react App. This HTML page code has some onload fucntions and stylings for the ...
-2
votes
0answers
19 views

Uncaught ReferenceError: global is not defined

I am getting a global is not defined error in main.bundle.js in production: link to screenshot
0
votes
0answers
7 views

agGrid in react + redux app is modifying underlying data

I'm using latest agGrid enterprise in react + redux app. The issue is that I'm using built in editing of agGrid and this is modifying directly underlying data i.e. array that is returned from redux ...
0
votes
1answer
20 views

Styled-jsx React native

I am trying to implement styled-jsx in React native project. I am following this tutorial : https://github.com/zeit/styled-jsx I have added this code : .babelrc : { "presets": [ "@babel/...
1
vote
2answers
41 views

how to loop through data and assign values to state array in react

I have a class component and its state contains a filterItems[] blank array. I need to populate the values inside the filterItems array So, I have a data coming from API which looks something like ...
0
votes
0answers
18 views

Problem in flow of adding and dispatching event

I have a DIV which has some content inside it , I just want to scale the DIV using resize event. The problem that I'm facing is in the flow of adding or dispatching event, beacuse I'm unable to get ...
0
votes
0answers
21 views

How to set a timer in the Map function?

I'm retrieving device info from a peripheral list using the Map function but I would like to set a timer in which there is a time gap in which I disconnect and move to the next Device. { Object....
0
votes
1answer
27 views

Sorting an array that is in another array in ReactJs

I have a json file called by fetch request that looks like this: [ { "Infos": [ { "id": { "Id": "105254" }, "total": 142854739 }...
0
votes
1answer
14 views

Spa can't find bundle.js

I'm trying to serve a SPA. I intend to send a single index.html and have the site be rendered in the client. The problem is when I load the site from a path that is not the root path, It no longer ...
0
votes
0answers
18 views

React Router Page Redirection with Session Storage

I am new to React and just want to make a simple route using React-Router, like this: Route.js If doesn't have session Token -> Redirect to Login.js If has session Token -> Redirect to Dashboard.js ...
0
votes
0answers
9 views

How to get the address of the place selected on clicking anywhere in the map?

To get the coordinates I use handleClick={e => { console.log(e.latLng.lat()) } <GoogleMap ref={props.onMapMounted} defaultZoom={15} center={props.center} onClick={e =>this....
0
votes
1answer
18 views

Is it a good design to use class style in material-ui react component?

I am working on a react website and trying to use material-ui component. I found that material-ui suggests put styles in components' classes property. Each component can use className={...} to take ...
0
votes
2answers
23 views

React Axios Get: Cannot display Empty Array

I am new to React and Axios. I want to GET customer data, yet when their address is empty, an Error appeared "TypeError: Cannot read property 'street' of undefined." When customer has address, ...
0
votes
0answers
17 views

React + Firebase - Can't read database

Rewriting my project with React hooks instead of class components. myfile.js import React, { Component, useState, useEffect } from 'react'; import * as firebase from 'firebase'; const MessageList =...
0
votes
0answers
16 views

How to split bundle javascript on react-scripts-ts

I'm developing react-app with typescript. My bundle js file is too large. Because of that, my application's loading is little late. As a result of search, I found out a certain js file is too large. ...
0
votes
1answer
24 views

How to use external JavaScript functions in ReactJs component?

I want to use external js like jQuery, lighterjs and other js inside my react project. I dont know how to include js inside my project
0
votes
0answers
7 views

Nested tab navigators don't work inside drawer navigator

I'm trying to embed tab navigators within a drawer navigator, but the drawer navigator sometimes stops working. Code: https://github.com/myplaceonline/testreactexpo/tree/drawernestedtabs To reproduce ...
0
votes
0answers
8 views

How to require images with variable without loading all asset images first?

I am new in react native. So, in my application user can upload item with images. The images is stored locally in device local storage and data of item is stored locally using SQLite. The problem is ...
0
votes
0answers
7 views

How to override global css for specific route with lazy loaded component in React Js?

A global stylesheet is imported in root index.js of my project. The stylesheet has background image of my app specified in it. Whenever I hit any route, a loader is displayed on that background until ...
0
votes
0answers
15 views

Expo dependencies in other libraries after ejection

First of all, I removed all imports from expo. Then I ran the expo eject command. The output: The output of expo eject command I chose the first option. Then I ran the app and got error for @expo/...
0
votes
1answer
17 views

Update another component when Formik form changes

There is a basic Formik form: <Formik initialValues={{ email: '', color: 'red', firstName: '' }} onSubmit={(values, actions) => { setTimeout(() => { alert(JSON....
0
votes
0answers
31 views

How to prevent to page from scrolling to top, on change in css variable

I'm using css variable to change the theme in my website and implemented it with redux, react. But on every change, it's scrolling the page to top. I'm unable to debug what change is scrolling the ...
0
votes
0answers
25 views

Hyperlinks are not clicked on HTML code in React native app

In my React native app I have installed this component to load full HTML from JSON posts from a Wordpress backend. After installing this component, the hyperlinks are shown as hyperlinks but there ...
0
votes
1answer
29 views

How can I add index as a parameter to useEffect hook?

Well, I am trying to figure out how to play with an array within useEffect hook. Basically, I want to know how to pass index as a parameter so I don't have to grab the indexes manually. I am fetching ...

http://mssss.yulina-kosm.ru