Quick and Easy Client-side JavaScript Search With Lunr.js

Search is a must-have for any website or application. A simple search widget can allow users to comb through your entire blog. Or allow customers to browse your inventory. Building a custom photo gallery? Add a search box. Website search functionality is available from a variety of third-party vendors. Or you can take the DIY approach and build the entire backend to answer search API calls.

Lunr.js works on the client-side via JavaScript. Instead of sending calls to a backend, Lunr looks up search terms in an index built on the client-side itself. This avoids expensive back-and-forth network calls between the browser and your server. There are plenty of tutorials online to showcase Lunr’s website search functionality. But you can actually use Lunr.js to search any array of JavaScript objects.

The Drawbacks of MobX

I would like to talk about what I could rarely find in articles covering MobX, about those drawbacks that ruin the impression of use, as well as how to crack this problem. I also need to describe its pros to justify my own choice. So, let’s start.

MobX is a state manager, which now has a new version 6 that works due to Proxy. The further opinion is based on using MobX v6 together with the React library when developing mobile (React Native) and web applications. It is worth clarifying that I used MobX v4, react-easy-state, Redux, Zustand in previous projects, and I’m also familiar with a dozen alternative state managers at the level of reading their documentation. I would also like to note that all the pros and cons listed below aren’t complete and can be detected if compared to other state managers.

Accessibility and Testing in Two Popular SPA Frameworks

I love working with JavaScript frameworks. But what I love most is building an interactive user interface with flawless accessibility. You have to be user-centric while developing apps because overlooking an end-user's perspective often leads to a half-baked idea. Considering this point of view, I found gold in Ember and Angular. These frameworks are great for building single-page applications and take accessibility to an extra mile. 

Angular is built with extensive capabilities to build bug-free applications with its supportive architecture. Ember, on the other hand, has got everything sorted for writing the tests to keep a consistent best practice in dealing with test cases among different modules of an application. For more details on different aspects of these two javascript frameworks, you can refer to our blog: Ember vs Angular: Comparing Two Popular SPA Frameworks.

Latest Features of Angular.js

The latest version of Angular was slated to release in March-April 2019. But, it eventually happened in 2019. Yes, we are talking about Angular 8 — the latest version of Angular.js. 

However, Angular 7.0 is supported until April 2022. So, it becomes imperative for organizations to explore the new features incorporated in Angular 8 and decide on embracing Angular 8 whether or not they should upgrade from Angular 7.0.