Posts under javascript
Cancelling previous requests in Search bar using Fetch
Abhishek EH | Mar 6, 2022 | 4 Min Read
Tutorial on how to cancel previous requests in in a search bar using fetch in JavaScript and React.
Read More
How to fix - this.setState is not a function error in React
Abhishek EH | Jan 21, 2022 | 3 Min Read
Guide on why this.setState is not a function error or Cannot read properties of undefined (reading 'setState') occurs and explanation on how to fix the error in 2 different ways.
Read More
What is the !! (not not) operator in JavaScript?
Abhishek EH | Jan 12, 2022 | 3 Min Read
Guide on what is not not or double bang (!!) operator in JavaScript and how it can be used to evaluate the truthiness of an expression.
Read More
What are three dots (...) or spread operators in React
Abhishek EH | Jan 8, 2022 | 4 Min Read
Tutorial on what are JavaScript spread operator and how to use it in React. Also explains about how to use spread operator for arrays and objects
Read More
How to fix "SyntaxError: Unexpected token < in JSON at position 0" and "Unexpected end of JSON input"
Abhishek EH | Apr 1, 2023 | 3 Min Read
Tutorial on how to fix "SyntaxError: Unexpected token < in JSON at position 0" and "Unexpected end of JSON input" errors in JavaScript and React
Read More
How to add script tag to React/JSX
Abhishek EH | Apr 1, 2023 | 2 Min Read
Tutorial on different ways to add script to a React component. Examples on methods like adding to the html, adding using useEffect and using react helmet.
Read More