IndexedDB is a transactional database which lives in the browser and is an asynchronous and key-value based object store with no strict data storage limits as long as the user permission and free space is there. Sounds pretty badass right?
Okay, so here are some of the things that I really like about
indexedDBis designed to work with large amounts of unstructured data, including Files/Blobs. …
The important thing here is that DOM (Document Object Model) is a system that provides us the access to interact with the Document and our code is not directly connected. We need our system to be able to respond to different DOM events and event listeners are the way we couple our system to the DOM to make it interactive.
The idea here is to be able to connect two systems to be able to respond to each other’s behaviours. …
Event Listeners help us in binding functions which are called when that event is emitted, like scrolling or resizing.
But what if the event is called multiple times in a very short span of time? If the function called by the listener is intensive, it can severely impact performance.
Debouncing and Throttling are really useful under such scenarios.
Throttling essentially let’s you execute a function only once in a given period of time.
If the time duration given is 500 milliseconds, no matter how many times the event is emitted in those 500 milliseconds, the event will only execute once. …
Let’s talk about the raw way of writing functions. Functions perform certain set of actions according to our requirements which could include fetching data, updating State, changing a set of mutable values and updating the DOM and so on.
And then our code base gets bigger and bigger and after a specific point, we have to deal with bugs. Arrrgh!
Fixing bugs most of the time is a tedious process because you have to go through potential culprits and sometimes there’s a lot! We fix them, then we have more bugs and the vicious cycle continues! At some point we might just look at our code base and end up saying this works although I don’t really know how! It’s Magic! …
Hi /fellas/g ! I know it looks weird but that addresses all fellas globally. Too nerdy? So is Regex. This one’s a beauty but you need to explore it to know it’s powers. I first realized that when I wanted to remove spaces of a string for some weird reason.
Obviously one solution to this is String.split(“ ”).join(“”):
However creating an Array to remove the spaces seemed too dirty to me. I am not sure if I have OCD!
So I went with String.replace(“ ”,“”). This doesn’t work for the simple fact that it only targets and removes one space. What if our target String has multiple spaces? We target them globally! …
This is my first blog and I am very new to React. So this post is going to be probably just random words thrown together and might not make much sense ;).
But anyways here I am writing this post mainly because I had a hard time deploying my React App to GitHub Pages and I would love to alleviate the suffering for the new React Developers who just want to deploy their work.
Now the first thing most of you will see when you search for deploying React to GitHub is ‘gh-pages’. …