Latest solutions
React + Styled Components + Debounce search
#react#styled-components#swr#typescript#viteSubmitted 8 months agoI used the handleChange function to check if the input is empty or not, this is the function :
function handleChange() {
if (!event.target.value) { setInputError('Whoops, can’t be empty…'); } else { setInputError(''); } setWord(event.target.value);
}
I think there is a better way to do this. Actually, the network request will be made, even if the input is empty.
Bmi calculator - React & Styled Components
#react#styled-components#typescript#viteSubmitted 9 months ago- How to create the Limitations of BMI section correctly, with the grid tool?
React / React Hook Form / Styled Components
#react#styled-components#typescript#vitestSubmitted 10 months agoI need some review on my layout and the custom input :
- My TwoColumns component is a good solution?
- My custom radio and checkbox input are good? I first create the icon myself with before and after element, but then I switched to use an svg icon with background property
React + Styled Components
#react#styled-components#viteSubmitted 11 months agoFor example, I have this global css variable : --spacing-xs: 12px;
If I want tu use it : padding-top: var( --spacing-xs);
But what if I want to have em instead of px? I tried something like this: calc((var(--spacing-xs) / 16px) * 1em) But it didn't work.
React + Styled Components
#react#vite#styled-componentsSubmitted 11 months agoI'm not sure about my List component. Can I improve it? An alternative?
Latest comments
