DEV Community

Cover image for Typos are a bctih
Ricardo Maya
Ricardo Maya

Posted on

Typos are a bctih

Errors, when programming, are a dime a dozen. It can be frustrating when you're unsure why the error is showing up in the first place. Was it because the usage of a certain variable was incorrect? Maybe I didn't import anything? Do I just not understand how to use this method correctly? The possibilities could be many and trying to find what went wrong is very similar to trying to find Waldo in a "Where's Waldo?" book.

It is exceptionally annoying when you figure out that the cause of all your headaches and misery is a simple typo.

I am in the process of creating an Instagram clone as a personal project to use in my portfolio/resume. I was passing data from a JSON file to be used by different React components. While mapping the data in my PostIndex component I set the variables in camelCase

imageUrl={this.props.image_url}
userName={this.props.username}
caption={this.props.caption}
Enter fullscreen mode Exit fullscreen mode

Then, when setting the data to use in my modal component, I couldn't understand why the data was not passing

<Card.Title>{props.userName}</Card.Title>
Enter fullscreen mode Exit fullscreen mode

Lo and behold! when setting the variables to be used for my modal, I needed the names to be spelled the same! Once I fixed this issue
Alt Text
all became right in the world again.

Top comments (0)