Message from JavaScript discussions

March 2019

— Sir I am Not getting I am a Beginner Can YOu please tell me

— 

<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
media only screen and (min-width: 768px) {
/* For desktop: */
.col-1 {width: 8.33%;}
.col-2 {width: 16.66%;}
.col-3 {width: 25%;}
.col-4 {width: 33.33%;}
.col-5 {width: 41.66%;}
.col-6 {width: 50%;}
.col-7 {width: 58.33%;}
.col-8 {width: 66.66%;}
.col-9 {width: 75%;}
.col-10 {width: 83.33%;}
.col-11 {width: 91.66%;}
.col-12 {width: 100%;}
}
body {
background-color: #D0E4FE;
}
</style>
<body>

<p><b><center> You can</center></b></p>

<center><button onclick="myFunction()">Try it</button></center>

<p id="demo"></p>

<script>
function myFunction() {
var person = prompt("Please enter your name", "shodkk");
if (person != null) {
var ifrm = document.createElement("iframe");

ifrm.setAttribute("src", ""+person); document.body.appendChild(ifrm);
}
}
</script>

</body>
</html>
>> this is the Code

— It's confusing because everything seems fine

— Nope. The handleTypeText is not a function, it is a independent component used by many other components. So, even if the present component has got unmounted, the component handleTypeText will be calling itself continously till the complete text is rendered. I am passing the setState method as a object to that handleTypeText component. Hence, the setstate will be called after unmounting, this causes the error

Message permanent page

— I guess the iframes here resizes according to the size of the screen https://dpaste.de/jWz5

— May be it's
setState creating error?

— Basically

— Because it is getting called when a component is unmounting

— Yes sir

— Can I get an image of screen with output you are getting

— Hi I'm new here I will like to learn java

— I need help