Skip to content

Tag: javascript

Alpine.js – nested components

I have code like this with nested components: but it seems it does not work. Is there any why to make it work using nested components or maybe Alpine.js cannot handle this yet? OF course I’m aware that changing: into would solve the issue, but this way I would have single component. Answer Alpine.js doe…

Angular Validator check if input is number

I’m trying to perfom form validation in Angular 9 to check if the value of a certain input is a number (integer or decimal). I therefore created the following custom validator: It works fine for an integer or decimal input, telling my that it’s valid, however it also tells me that the following st…

Axios change http to https

I have server that accept only http (no https). And when I call an api, axios automatically change http to https. I create axios instance here: But in browser http changes to https, so it become: https://xxx.xxx.xxx/api/v1/all and I get net::ERR_NAME_NOT_RESOLVED How can I prevent that? UPDATE Request Header:…

‘useEffect’ hook only fires once?

I am working of a Guessing Game for ‘React Native’ where the user enters a number and the phone tries to guess it. Each time the phone generates a guess the user can click Greater/Lower. When the user entered number and the computer made guess equal each other we are taken to the game over screen.…