Skip to content
Advertisement

Tag: reactjs

Changing an object value from a Class

I have a js file handling my css where I am trying to change the value of an object, but the value stays the same. I assume the “this.opacity” is only returning a reference and not modifying the actual object and I am unsure of how to make this object mutable. How would I go about changing this value? Answer

Adding and deleting array of classes error

Below is my attempt to create an array of classes. The functionality of app is next: one can add or delete extra Input box and increase or decrease its value. As a result the app displays the sum of the all present tags. The issue comes with Delete function, when deleting any of components from created list it does correct

React: How do you lazyload image from API response?

My website is too heavy because it downloads 200-400 images after fetching data from the server (Google’s Firebase Firestore). I came up with two solutions and I hope somebody answers one of them: I want to set each img to have a loading state and enable visitors to see the placeholder image until it is loaded. As I don’t know

REACTJS how to load a page at the end of timeout?

Im new to REACTJS and trying to make a webpage for practice. I can’t figure out how to load a new page at the end of timeout. Basically what I am trying to do is to make the Main page load and then start a timer for about 5 seconds and at the end of the 5 seconds I would

React Native – Pressable – Can’t run sample code

i am trying to run the example code from react native you can find here: https://reactnative.dev/docs/pressable I allways get the error message: Warning: React.createElement: type is invalid — expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s%s, undefined, You likely forgot to export your component from the file it’s defined in, or you might

Too long title slide the menu button to the right outside of the card

I have a problem with MuiCardHeader For some reason too long title or subtitle slide the menu button to the right outside the card. How can I prevent it? Result I need Here is code sandbox https://codesandbox.io/s/dazzling-paper-5d35h?file=/src/App.js UPD: Solution Add the following code to .MuiCardHeader-content class Thanks to everyone for help! Answer You need to restrict the parent with text-overflow:

Advertisement