i want to create a new array from api, but i don’t know how to make it, i’m very confused in looping each array This is each data this is the main data of api i want to create a new array like this, bcs i want to create a new object containing the group_id of each same data in
Tag: reactjs
How can i display an image from mongodb in binary with reactjs
This is my model in MongoDB And i was able to display it in the backend with EJS like this However when i try to display the image in the frontend with reactjs i cant, this is what i’ve been trying Answer I would start with this mongo document: Then you can treat the image everywhere as a simple string,
Map only a particular object based on ID in Typescript
I have an array of objects, which looks like: I am currently using this array of objects to map over all items like this: This loops over all the products, but I would like to have this code limited to one particular product. Like with ID=3 or whatever I supply. The above code helps me find it, but I cannot
Sending the id of the respective component through a click
I am trying to send the id of the respective object through an on-click event , yet I always end up being sent the synthetic onClick event , how can I change this ? How my array of objects looks like : My onClick={(id)=>handleOpen(id)} EDIT: It was recommended to change the renderig of the button in the fo…
React-native-action-button : change position of action items
I am actually trying to use action buttons in React-native, but I have problems customizing action buttons position. Using react-native-action-button (“react-native-action-button”: “^2.8.5”), buttons are positioned vertically, just like that: Action buttons But, I would like something …
I’m using React and my components are not rendered
I’m trying to follow a React tutorial this code should render some buttons, but it isn’t happening. I’m using codepen.io to make the code and I can send the tutorial link if necessary. Answer You forgot return your Pad component.
Navigate through child routes using react-router-dom V6
I am using react-router-dom V6 both Routes and useRoute, So, in the site, the main routes are as follow: As see above the second Route’s element is <AdminApp /> this element is coming from the following: So whenever i call the route /admin nothing display in the screen and in the console log I am …
Cant select text, cant position caret in Firefox – Slatejs
Description Slatejs editor only in Firefox fails with text selection and caret positioning (by mouse). It always selects position before first character (path[0] offset[0]). You can still use the keyboard to select text and position caret. Recording Firefox: Chrome: Expectation It should select text and posit…
Unable to access properties on Typed React Redux store
I been searching up and down google, official docs, stack overflow for a way to access my Redux store, from a React functional component (Typescript). In theory this should be easy to do with the various guides out there, but no matter what I do I keep getting undefined errors. I am able to get the store obje…
How do I use the useState hook to change the color of my react icons to blue?
I want to use a useState hook to change the color of my react icons to blue in my sidebar upon clicking one of them. I tried this and then in the return I would like to know what I am doing wrong? Any help would be greatly appreciated. Thank you. Upon further inspection, I styled using component styles, so