Skip to content

Parse html from JSON file

I’m trying to get HTML tags to work in my json-file that i fetch via js. So i want the return to somehow make the <strong> to work when render it on the page. How would i do that? Sample of the json: JS: To render it i do like so: pseudo. Answer Change innerText to innerHTML. When you use

How to show not found on base url

This is the code: App Base NotFound https://codesandbox.io/s/summer-sound-giti8c?file=/src/App.js I want that when someone goes to the base url say https://giti8c.csb.app/ then NotFound component should be rendered. Currently, only Base component renders on going to the base url. Answer I want that when someo…

Password validation in a modal javascript

I am trying to check if two passwords (password1 and password2) in the input fields are the same. If I click the button there is automatically a text which is not in the corresponding condition of the button. I am trying to fix to display a text when – 1) Checking of empty password field. 2) minimum pas…