Skip to content
Advertisement

Tag: reactjs

Unable to resolve module [external url] within the project or in these directories: node_modules

Im doing a project in react native I have an object of exercises that include images and videos, everything is fine when the object was created, but when I imported into another file I get this error undefined Unable to resolve module https://assets.soysuper.fit/cutted+mvp+mp4s/bodyweight_squats.mp4 from /mnt/c/Users/USER/Documents/superfit/app/src/screens/Patient/Workouts/ExercisesList.ts: https://assets.soysuper.fit/cutted+mvp+mp4s/bodyweight_squats.mp4 could not be found within the project or in these directories: node_modules This is

Paging in react

good morning, how are you? I’m having a problem with pagination, when I click to change the page it appears the page results and goes back to the first one right away, would you know how to help me? For example, if I click on page 2, its results appear but it immediately goes back to page 1, I don’t

Get Min date and Max date from Object

How can I find out the min and the max date from an object? Currently, I am getting an array like this: min date should be ‘2010-02-24’ and max date should be ‘2022-10-04’. Is there any built-in function to do this? Thanks in advance. Answer A sort will do the job here, by packing all dates into an array first:

Can I get away with not using useEffect in this instance?

I’m still learning React and the proper way to do things. In this React project I am using the TinyMCE editor: https://www.tiny.cloud/docs/tinymce/6/react-cloud/ I want to display a warning message about unsaved changes once the editor has been made “dirty” that is that the user has modified the default content you get on reload. The component that contains the editor has

React: multiple sliders sharing a common state

I have two sliders, each with an event listener. Using your mouse to adjust one slider should update a shared state, which should then cause a change in the second slider. However, I only want the event listener for the first slider to fire. In the code I have below, the second slider’s event listener is also firing, as can

Building Grid with random alphabetic characters

I’m working on a project where I need to build a 5*5 grid that is populated by random alphabetic characters(there can be more of the same letter). I’ve built this function, but the problem is that it’s always the same letter showing when rendering and in the log the letter is never repeated. Answer Represent the whole 2D array in

React’s useRef hook doesn’t take a function?

I’m used to passing functions to useState, so that i don’t create unnecessary objects: I expected that useRef would work the same way, but the below returns a function instead of calling it once to intialize, then returning the prev created object after that. I suppose one could do something like this, but seems a lot less clean. Am I

Advertisement