I tried to setup jest testing with react testing library in the Next.js TypeScript…
I came across this issue when I created the SVG icon component in Next.js.
I have ran into this for trying to build the responsive design with SSR feature in NextJS.
Here I captured the steps when I worked through to the end solution.
I worked with a project and we used SVG for icons. SVG is called Scalable Vector Graphics and it provides a lot of benefits as an image type/extension, it is scalable and the size is very small comparing to png and other image type.
I started to work with styled component in React and want to capture my learning here.
npm i styled-components
import styled, { css } from 'styled-components'
Today I found out something interesting when I worked with form validation with react-hook-form .
react-hook-form
Here are the code.
const Test = ({ offerStartDate, register, getValues, setValue, errors,}) => {
I tried to refactor the route and saved it to constant variable. I defined the ROUTE and ROUTE_TYPE…
ROUTE
ROUTE_TYPE