Conventions used
There are a number of text conventions used throughout this book.
Code in text
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “First, you need to create a robots.txt
file to allow search engines whether they are allowed to crawl parts of your website, and which parts they are allowed to crawl.”
A block of code is set as follows:
export const getPostById = async (postId) => { const res = await fetch(`${import.meta.env.VITE_BACKEND_URL}/posts/${postId}`) return await res.json() }
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
{fullPost ? ( <h3>{title}</h3> ) : ( <Link to={`/posts/${_id}`}> <h3>{title}</h3> </Link> )}
Any command-line input or output is written as follows:
$ npm install node-emoji
Bold: Indicates a new term, an important word, or words that you see on screen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “Connect to the database, then expand the Playgrounds section (if it is not expanded already) and click on the Create New Playground button.”
Tips or important notes
Appear like this.