Set up your Next.js project with TypeScript, Tailwind, React Testing Library, Jest, Prettier, and ESlint.

human hand rising from the ocean
human hand rising from the ocean
Photo by nikko macaspac on Unsplash

TL;DR:

0. Nextjs Starter Templates Example’s Directory

There’s a directory in the nextjs GitHub repo that most people ignore, the example’s directory! It contains numerous nextjs starter templates with various partner technologies. Some of these include nextjs with: typescript, tailwind, apollo, urql, relay, redux, chakra ui, docker, react bootstrap, reactstrap, styled components, jest, testing library, etc. All you need to start a nextjs project with any of these templates is to run the create-next-app cli tool with a — example flag.

Examples:

npx create-next-app --example with-tailwindcss name-of-your-project

2. NextJs with typescript

npx create-next-app…


Banner image with GraphQL Logo and written “GraphQL”

Generate GraphQL Schema From Endpoint. Generate GraphQL Queries,Mutations,Subscriptions from GraphQL Schema.

Lets cut to the chase, shall we?

a). How to download/fetch/print schema.graphql from GraphQL endpoint?

npx get-graphql-schema https://countries.trevorblades.com > schema.graphql

2. A file named schema.graphql is generated in your current working directory.

b). How to generate GraphQL Queries, Mutations, and Subscriptions from GraphQL Schema?

npx gqlg --schemaFilePath schema.graphql --destDirPath ./queries-mutations_subscriptions --depthLimit 5

2. A folder named queries-mutations_subscriptions is created in your current working directory with queries,mutations, and subscriptions sub-folders inside

c). It’s Done!


What are tests. Why test. What to test. What to use to test. How to test.

How to test react applications with jest and react testing library. Image courtesy of morioh.com

Table Of Content

TL;DR:


What is GraphQL? How can I set it up for my project? And more

React, Apollo, GraphQL. Image courtesy of hackernoon.com

TL;DR:

What is GraphQL?

GraphQL is a query language for (API) data developed by Facebook. GraphQL gives clients (front ends and other APIs) the power to ask for exactly what they want, nothing more or less. …


Containerization on the front-end with React and docker in development and production, and deployment of a React application with docker and nginx

Deploy react app with docker and nginx. Image rights https://www.hkinfosoft.com

TL;DR:

a) Create a react app

b) Install docker and docker compose

c) Create a dockerfile (with a node image for building and an nginx image for deployment)

d) Create docker compose file

e) deploy the container

The Analogy:

Imagine you want to import a laptop¹ from china. You order the laptop online, you are assigned an order tracking number, they package it inside a carton, label the carton with the order number, write it’s details in a catalog², an then pack it alongside other ordered items inside a shipping container. The container is then loaded on…


N/B:

Case in point: A globemax DVB-T2 Tv stick (see the naked hardware tear-down for the panasonic MN88472 here ) and the (hardware tear-down for the MN88473 demodulator version here). There are two variants of the stick with the following components:

Key components: Realtek RTL2832P USB interface Panasonic MN88472/MN88473 Demodulator…


Case in point: A globemax DVB-T2 Tv stick (see the naked hardware tear-down for the panasonic MN88472 here ) and the (hardware tear-down for the MN88473 demodulator version here). There are two variants of the stick with the following components:

Key components:
Realtek RTL2832P USB interface
Panasonic MN88472/MN88473 Demodulator (2013 and 2014 variants respectively)
Rafael Micro R828D Tuner

sample pictures:

Macharia Muguku

A student of the world ; My brain has too many tabs open ; 🇰🇪; www.muguku.co.ke

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store