Category "reactjs"

Camera Preview in Expo is Distorted

I'm using Camera that comes from expo package and I'm having trouble with camera preview distortion. The preview makes images appear wider in landscape view and

Semantic UI React - Table - Make whole row selectable and link somewhere

I have tried making a row selectable but I want to be able to click anywhere inside the row and have it link somewhere. Each row should have a different link.

EventEmitter.removeListener('keyboardDidHide', ...): Method has been deprecated

Please help me, I don't know what this warning is. I'm trying to render a chat room with chat messages between two users from Cloud Firestore database. This war

Is it possible to map only a portion of an array? (Array.map())

I am building a project using React.js as a front-end framework. On one particular page I am displaying a full data set to the user. I have an Array which conta

Cant load a react app after starting server

(node:13176) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewa

Cancel drag or disable reorder

Is there a way to cancel drop action of react-beautiful-dnd's Draggable object? I have a list of items with one item to be always at last position. I want to

How to check that an ipfs hash is an image/video/.. in React Js?

I need to use the ipfs hash to find out whether the file is an image or a video so that i can use it to either show the image/play the video. Couldn't find any

Detect previous path in react router?

I am using react router. I want to detect the previous page (within the same app) from where I am coming from. I have the router in my context. But, I don't see

React.useState is changing initialValues const

I'm experiencing some odd behavior with react's useState hook. I would like to know why this is happening. I can see a few ways to sidestep this behavior, but w

React: How optimize a custom hook that shares data?

I have a Custom Hook similarly with the below: import { useEffect, useState } from 'react'; import axios from 'axios'; const myCustomHook = () => { cons

react native - requiring unknown module

I have been trying to load local image files in ListView. It does work when I hard code: return <Image source={require('./public/image1.png')} style={{wid

How to create a custom hook that recives dependencies?

I'm making a custom hook that have a toogle when some state change. You should be able to pass any state in an array. import { useState, useEffect } from 'rea

How to get state of Reactstrap's CustomInput Switch component, and how to map switches from an array?

<FormGroup> <div> {this.props.diseases.map((disease, index) => ( <FormGroup> &l

How do you simulate an keyDown enter event (or others) in Enzyme?

I'm trying to simulate a keyDown event, specifically for Enter, keyCode: 13. I've tried a number of different ways of doing this, but none of them are working.

How can I create dynamic titles in next.js <head> section?

I have a fully functioning website but the head sections doesn't retrieve page specific <title> and <meta description>. For example, if I'm on the

i tried to Polyfill modules in webpack 5 but not working (Reactjs)

Hi guys am a newbie in React when i start my project i get the Wepback V5 Error Message Resolve updated : https://github.com/facebook/create-react-app/issues/11

How to catch and handle error response 422 with Redux/Axios?

I have an action making a POST request to the server in order to update a user's password, but I'm unable to handle the error in the chained catch block. retur

Netlify renders 404 on page refresh (using React and react-router)

I have deployed my site with Netlify, and I’m having trouble with the routing. Here is my website: https://redux-co.netlify.com/ And my GitHub repo: ht

How to prefill CkEditor with data using React.js?

I'm creating a blog and I want to give the user the ability to update their post but I'm not sure how to pass the content data from the original post into my ri

Error when deploying react app and it keeps sayings << Plugin "react" was conflicted between "package.json » eslint-config-react-app » >>

I have been having a little bit of issues when deploying my create react app, as it fails to compile and tells me Plugin "react" was conflicted between "package