so the error is "Text strings must be rendered within a component"
.
I have done everything well but my virtual device and terminal show me:
Text strings must be rendered within a component
error.
.
in this case, I was trying to find out what I did wrong actually. after some time I got wrong what actually I did.
.
it occurred because I made a comment in a render function. which is like the below screen-shot:
to solve this error I remove this comment from the render function which is like the below screen-shot:
and then it's working nicely:
and here is my output both terminal and virtual device:
Now the problem is solved.
but I have more curiosity why I can't write any comment in render function to clarify this, I tried to another way. which is like the below screen-shot:
now I can able to write a comment to render a function like this method.
.
now it time to try another method and it's not working which is like the below screen-shot:
.
so finally I understand that either I should not write any comment in a render function
.
or
I have to comment like the below procedure:
.
the problem is solved and understand more clearly why it happens and how to solve this.
thats it.
.
Happy Coding.
osman forhad
Mobile & Web Application Developer💻
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (3)
pretty dumb framework then
I checked this approach, but didn't seem to solve my issue!
Hi, what was your case?
I'm using inside my but am getting this issue. When I remove the Button, everything works.