Category "reactjs"

React Native Teleport components without loosing state

I am using React Native 0.62 with react-native-video. I need to add a video player with full screen option. The requirements specifically needs custom controls

Babel throwing Support for the experimental syntax 'jsx' isn't currently enabled

I started newly writing unit test cases using Jest and Enzyme for the react application and when try to run test cases using jest like "test": "jest --watch" ra

Webpack conditional build based on configuration values

I'm looking for what ultimately would be a Webpack equivalent to Require.JS's has.js integration. In Require.JS you can compile different code paths based on a

React Console warning --- React.createFactory()

I am facing the below warning in the console whenever my react application renders and every time the code re-renders, Can anyone help me out how to sort out th

React Hooks with Redux & MVVM architecture

I am trying to update my React application to use MVVM as an architecture pattern. I initially built it out with Hooks and Redux. I've come to find out that eve

Use Async/Await with Axios in React.js

Following How to use async/await with axios in react I am trying to make a simple get request to my server using Async/Await in a React.js App. The server l

First Character is not displaying in input field useForms

When I click on Submit, it gives an error "required". But when i type text it doesn't take first character. On entering first character it only removes "require

React Hooks with Redux & MVVM architecture

I am trying to update my React application to use MVVM as an architecture pattern. I initially built it out with Hooks and Redux. I've come to find out that eve

How to set a loading state for react component while sorting and filtering data?

I am trying to implement a table and do filtering and searching of data from the table. Since the searching and sorting takes a while I would like to implement

Adding a key-value pair to an object inside loop using React useState hook

I'm trying to add a key-value pair to an object using useState inside map function. However, the spread operation in setContainer({...container, [data.pk]: data

React not rerendering after mobx observer change

Upon page load, I see "hi2" When I click the button, nothing happens. I tried with setUser as well. I suspect I'm just editing the props themselves and somehow

ReactJS Functional Component vs Component Functions for conditional rendering

Sometimes I want to move my conditional rendering out of render(), and I always have dilemma between these two approaches: class MyComponent extends React.Comp

How to install facebook event pixel in react component

I have a Facebook base code for lead tracking installed in my React app. All I want to do is to add fbq('track', 'Lead'); to my "Thankyou.jsx" component. All e

Handling with event input and debounce function

I'm trying to use this debounce function, in order to get a text inputted from user. Without debounce function, this works well (with the problem of triggering

ERROR in ./node_modules/axios/lib/adapters/http.js

I get this error after installing and importing axios in my react project, any help?: Compiled with problems: ERROR in ./node_modules/axios/lib/adapters/http.js

A side question to my earlier question: ternary operator

I want to ask you a quick question as a followup to my earlier question: React - syntax confusion to clarify code for TodoItem: import React from 'react' expo

Export 'Switch' was not found in react-router-dom

how can i solve this problem Compiled with problems: ERROR in ./src/App.js 20:37-43 export 'Switch' (imported as 'Switch') was not found in 'react-router-dom' (

Display data in Table and Modal using ReactJs

I am new to react. I want to make dashboard using Reactjs and Reactstrap but I have a problem. I want to display my data in the table and show mya all data in m

react-leaflet map is not correcly displayed in Ionic 5

When i am trying to display map in mobile view i see broken map: https://stackoverflow.com/a/36257493/13739566 - in this link is description why it doesn't

How to multiple TextInput handle with single handler?

I have create common class for TextInput and use it multiple time but its event handle with same method. i want to handle array data after filled the data in te