Book Image

Next.js Quick Start Guide

By : Kirill Konshin
Book Image

Next.js Quick Start Guide

By: Kirill Konshin

Overview of this book

Next.js is a powerful addition to the ever-growing and dynamic JavaScript world. Built on top of React, Webpack, and Babel, it is a minimalistic framework for server-rendered universal JavaScript applications. This book will show you the best practices for building sites using Next. js, enabling you to build SEO-friendly and superfast websites. This book will guide you from building a simple single page app to a scalable and reliable client-server infrastructure. You will explore code sharing between client and server, universal modules, and server-side rendering. The book will take you through the core Next.js concepts that everyone is talking about – hot reloading, code splitting, routing, server rendering, transpilation, CSS isolation, and more. You will learn ways of implementing them in order to create your own universal JavaScript application. You will walk through the building and deployment stages of your applications with the JSON API,customizing the confguration, error handling,data fetching, deploying to production, and authentication.
Table of Contents (9 chapters)

Business Rules Engine

Business Rules Engine is a technology (or pattern) for resolving specific user/system/permission/language-related conditions. It provides a convenient way to understand feature availability for the brand, account, or particular user, without knowing which actual conditions are involved in the check.

Why is such an API needed?

In order to better understand the approach, take a look at this JSX example:

<div>
{(user.isAdmin && account.balance > 0) && (
<button>Add users</button>
)}
</div>

Obviously, these UI conditions are trying to figure out some specifics of the current state of the account and understand whether an action is permitted or not. Imagine now that under some other system conditions (the account is a trial, for example), there is no such case as balance; this system state has something a...