I am new with React and I am trying to display three cards in a row but they do not align horizontally, they are vertically (from top to bottom). I tried using cardDeck or cardGroup, but they do not work. Below is the code Also, I did a sass file to import in the code above but it seems it
Tag: reactjs
How to write a hook to load more button from fetching a json?
I am calling my fake api using fetch and getting Json data. How can I wire up my load more button so that it it loads more data? Everything works, I just need to add functionality to that load button. I have an empyt function… See code below: Answer So you already have all the data but you need to
In JS ES6, why is it that if I export default, then I cannot export it individually?
I found that I can do: but I cannot move that default to the top: Why is that? They just seem to serve the same purpose: export Foo as default and individually, but the first form is ok while the second form is not. Answer I can’t quite tell if this is a language quirk, because I never see a
Full Screen on Android Chrome showing white band on Notch Area
The javascript code that I’m using, to fullscreen my web app, Usually, I’m getting a black background on the top-notch area on every page I’ve tried to implement this through console, but on my webapp, I’m getting a white background. I’ve tried adding Although, this is no success…
How to remove event callback with parameters
I have a web application that page A has video, and page B doesn’t. The video has the onended event when it finishes video playback. I tried to remove the event before the component unmounts with removeEventListener, or the video ended event will be fired after I switched to page B. However, I cannot fi…
React – how to apply local storage for hook value
I use the react-range package for personal purposes of my project, the problem is that I cannot save the value when the page is refreshed, I tried to use the local storage but I could not As you understand, I need to save the value using local storage, in addition, I will leave a link to mine on codesandbox l…
React – Unhandled Rejection (TypeError): e.preventDefault is not a function
I’m getting this error below when I try to implement an Axios post with react-hook-form: The problem started occuring when I added onSubmit={handleSubmit(handleSubmitAxios)} to my <form>. Basically, I want my form to be controlled by react-hook-form, using my custom handleSubmitAxios post call tha…
Trying to understand the flow of React
Someone ask me to help on a Raisely.com project / webpage. Because of that I need to do my first component in React. I did a simple component to check the flow of this React thing :O) I put this component on a profile page… when I navigate to a profile, clear the logs and go to another one. The
Querying Airport Lat and long from Airports.JSON react native
Im trying to query from a JSON file I import like this. you can find the File here I put it into a variable and get the lat from the first object perfectly fine. I have many objects to get the lat and long from so I tried a for loop I get Undefined for my console.log(airportLat) help would be
Different between anonymous function and directly calling the function in a React component
Sorry this is more about lack of enough JS knowledge I think but my question is in my component if I have <td>{() => this.renderCell(item, col)}</td> method being used like that it won’t work but being called normally like I have in the component below then it works: What’s the diff…