Skip to content

Tag: reactjs

Send data on key ‘Enter’ – React

I’m trying to send my fieldset when I press Enter, but my function does not return my console.log Here is a fragment of my component : Here is my function : Why is my console.log not responding when I press enter on my page ? Answer You’re almost there, just replace onKeyPress with onKeyDown and i…

running a Development server on NextJS (on the network)

While using ReactJS, when we use the command npm start, It starts the development server on localhost:3000 and also on the network, 192.168.1.2:3000 This was super easy, I could test my app on all the devices by going into that address. Recently I started learning NextJS and when I run the command npm run dev…

How to have an array of objects based routing in react?

I am learning React. But I am familiar with Vue. In Vue with the Vue Router, we can have an array of objects based routing like, What I tried so far is as below : Login.jsx Dashboard.jsx App.js But in the above approach, I am always getting redirected to “/login”. Is there anyways to fix this? Tha…

Why is my React Function component not appearing? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question My code snippet is below. This is meant to be a small CRUD web application and I have created…