Conditional Rendering /// 1 of 100few ways

2 min readAug 20, 2021

Ever been building a single page application using React and get an error similar to, “TypeError: Cannot property “slice” of undefined” whenever you refresh the page?

Error before conditional rendering

I ran into this problem during my time at Flatiron School but I have to admit, I found work arounds while coding my final project that made it work but never fixed the problem. The problem is that React is trying to render a…


Learning. Puttin up shots in Angular and Java and Python and anything else I get my hands on. Sights set on becoming a gainfully employed developer.