Loop function inside html in javascript (React)

I want to loop over my function SliderComponent, with different inputs, inside the Html in order to create several components. I found this solution online where we build string and return as Html, using “id” and “getElementById” but I can’t make it work. export function GrommetButtonEx() { return ( <div> <Grommet theme={grommetTheme}> <Sidebar border={{ color: … Read more

How to dynamically create an array of buttons in React using MonogoDB?

Im trying to convert my static product configurator into a dynamic one using the MERN stack, and I am really close to being done with the test version finally! I have everything working, but I am having trouble making it even more dynamic. In my configurator here for example, I have the ability to change colors through a list of hard coded buttons that trigger an event. This gets tedious with the amount of products that I will be trying to deploy to our website, and some products are only available in one, two, or three materials. I have successfully uploaded an array to MongoDB and is structured like so: How to dynamically create an array of buttons in React using MonogoDB?How to dynamically create an array of buttons in React using MonogoDB?How to dynamically create an array of buttons in React using MonogoDB?

Why do my breakpoints work if I scale down the window but not on mobile?

I created an online shop and used Media query breakpoints to adjust the content based on the screen width. Everything works fine if I change the screen size by changing the size of the browser. At the set breakpoint, my navbar collapses and everything looks great. But as soon as I switch to Mobile view things get weird. Somehow no matter how small I make the window, the navbar remains as it is. I have heard that the Chrome Dev tools are unreliable and can cause issues with responsiveness so I connected to my website with my iPhone 12 and the result stays the same, no responsiveness whatsoever.

Hooks are not rendering in React at all

I’m building an e-commerce website. Now, I’m working on creating the navigation bar that has the names of the available categories, and once a category is checked (clicked). All the items that have that are listed in the specific category will render in the same page. Right now, I’m working on rendering the names of the products. Here is my code for each part which are navigation bar, all items page, item card.

How can I add react project to an existing jquery/vanilla js project?

I have a main/hero website built with html+jquery and dashboard with react. Currently dashboard serves from different subdomain (dashboard.example.com)and website from (example.com). I would like them to be in same folder such that website would still be (example.com) but dashboard would be (example.com/dashboard). Can someone help me how I can achieve this?