Skip to content

Tag: reactjs

in react file upload not working properly

If you select any file its working perfectly but after selecting any file again if you click choose file button and not select any file then error occur “Cannot read properties of undefined (reading ‘name’)” how to resolve this error. I also gave filename===undefined but its not workin…

react-i18next ignores options parameter

I wanted to organize better the language translation files of my project having to nest objects in the language file. Without nesting everything works fine Even nesting objects I can access them by passing the attribute directory in the t() function (ie: t(‘section.subsection.text’) Documentation&…

Render div with state only on phones

is there some way how to render div conditionally with state but only for mobiles? I have show more button, but i need it only for phone resolution, also I need to display that div with className text every time on desktop Answer you can set the active class in the media query. At first, you can this div disp…

Paypal dynamic value in react js

I need help with my project I want to add a dynamic option to the PayPal payment process. ( change the value to be dynamic ) the default option is value: ‘0.01’ and the dynamic payment in my project is cart.subtotal.formatted_with_symbol I try to add [const {amount} = cart.subtotal.formatted_with_…