Category "reactjs"

react native flatlist animation is not working as expected on RTL devices

I'm working in app that needs flatlist animation with RTL devices. I built a small app to understand how it will work. When using the app with LTR devices, it w

Transparent background of the images are too big

I'm trying to position three images with flexbox inside a container, but the images have a transparent background, that somehow interfere with each other. Here

Next.js, Strapi - Fetch response is empty

I have nextjs frontend that fetch data from strapi backend. Problem is that data is empty even if i can see on strapi dev logs that request has been made. This

Custom components in react-markdown

I would like to create a custom component in react-markdown. Specifically I need to be able to create a tag that will allow me to create a tooltip. E.g. [name]{

Pasting file not work from clipboard on react (updated -> about clipboard permission)

I want to impement to file upload by paste from clipboard. so, i tried that get a file object from onPaste. const handlePaste = (e) => { console.log(e.cl

eslint error 'value of props' is missing in props validation using React JS on moving the props from return section to a new function

I'm getting below eslint error after moving the props to a separate function. Here is my initial code and it is getting compiled successfully: const MessageComp

How to Map the Buffer TimeRange Data From an HTML5 Video Player Ref to a Progress Bar?

I'm basically just trying to emulate the buffer bar from the default HTML5 video player or like on YouTube. I am making a custom JSX HTML5 video player control-

React TypeError: __WEBPACK_IMPORTED_MODULE_0_react__.PropTypes is undefined

I am making a react app using routers and I'm getting the following error: React TypeError: WEBPACK_IMPORTED_MODULE_0_react.PropTypes is undefined How can I a

Sticky Sidebar In React.js

I tried some packages as well as a jquery solution for the same questiion. (I copied the question because of its good explanation). But I want it in React. Help

Conditionally use next.js app or create react app with the same website domain according to users login

I have a website which I've built with CRA, node.js and I want to use ISR for most of the pages. The problem is that about 20% of the users are registered users

Why in NextJS, logo is not visible when visiting from page URL

My logo is not loading with /page URL Screenshot Here is my components/LayoutWrapper.js import Image from 'next/image' import icon from '../assets/images/Icon

Why am I having too many re-renders in my React.useEffect()?

I'm still beginner using ReactJS and I'm not understanding a problem I'm having. My useEffect is getting a list of data and after that I do a filter. But when I

How to use &nbsb; in react-intl

How can you use   when using react-intl so control word breaking. I have a message like Rs. 100,00,000 but it is breaking on Rs. is there anyway in can

Cannot find module 'react-dom/client' from 'node_modules/@testing-library/react/dist/pure.js'

hope someone could help me here. while running npm test got following mistake Cannot find module 'react-dom/client' from 'node_modules/@testing-library/react/di

Stripe API: Module not found: Can't resolve '@stripe/react-stripe.js'

Do I have a simple typo? Do I need to install anything else? I'm getting the following error message: "Module not found: Can't resolve '@stripe/react-stripe.js'

React Native: Phone won't go to sleep while app is open

I'm trying to test some behavior in my React Native app when the phone goes to sleep, but the phone won't sleep when the app is open. I have the auto-lock set t

Fetching local JSON

How can I fetch a local JSON file that is in my directory? the JSON file looks like this: [ { "name": "Sara", "id": 3232 }, { "name": "Jim

How can I add to props and make a select option disabled?

I have a dropdown list which I am getting from a list that is part of props. A Visual of how the props look like when I do console.log(props.farmAnimals) {id:

How can I add to props and make a select option disabled?

I have a dropdown list which I am getting from a list that is part of props. A Visual of how the props look like when I do console.log(props.farmAnimals) {id:

Modifying back button with react-navigation on specific screen

Here I'm using react-navigation as my navigation library. How can I change the back button (that is added automatically by react-navigation) functionality for a