Skip to content

Tag: reactjs

Axios is returning empty string value

The problem I’m facing here was, whenever I fetch the data with a button click (the button that leads to this route), the data will be fetch successfully, but whenever I input the link address directly myself in the browser, It keeps returning empty string when i console.log the data (Like this <empt…

How to add the option to allow only one space in a regex

I want a regex that will allow only one space within a set of characters. I have the below regex which doesn’t accept space. The below regex only supports strings like 1. @alia 2. @ranbir 3. @shilpa I want a regex that will allow strings like 1. @alia bhat 2. @ranbir kapoor 3. @shilpa shetty Answer You …

Remix useSubmit arbitrary data

I am trying to submit a form using Remix’s useSubmit hook. But I want to be able to pass arbitrary data along with my form submit data. I have form elements with some static values that have disabled/readonly attributes, which means their value will be null on form submission. However I have access to t…