Posts by kyen99
This common Javascript error, “Element type is invalid,” is usually caused by a mismatch between import and exports. You are trying to import the default export from a module that only exports...
[The easy way to] get url params in React without react-router
React Router is a great tool for handling routing in React apps. But, if you aren’t building a full single-page app (SPA) react-router is probably overkill. If you just want to get access to url...
[How to fix] Uncaught ReferenceError: ReactDOM is not defined
This easy to fix error is caused by calling ReactDOM without importing the react-dom npm package. It’s also possible you have a typo in your import.To fix this error, check to make sure the...
[The easy way to] check if a string contains a substring in Javascript
There are several methods to check if a substring is contained within a string in Javascript. Here are several methods that should work for you.The easiest and most compatible method to find a...
With React Router (react-router) it’s super easy to make links to navigate to other parts of your application. Here we’ll look at using React Router (v4 and v5) imperatively to allow navigation...