일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
- 기준
- evm
- SSR
- nextJS
- blockchain
- HTML
- express.js
- bitcoin
- JavaScript
- concept
- REACT
- solidity
- web
- CSS
- built in object
- error
- hardhat
- API
- CLASS
- Redux
- graphQL
- useState
- Ethereum
- Props
- 삶
- typeScript
- tailwindcss
- middleware
- Interface
- node.js
- Today
- Total
목록전체 글 (373)
ReasonJun
Date-fns is a JavaScript library that provides a comprehensive set of date and time utilities. It is a popular library with over 14,000 stars on GitHub. Date-fns is a great choice for working with dates and times in JavaScript. It is: Accurate: Date-fns uses the native JavaScript Date object, so you can be sure that your calculations are accurate. Easy to use: Date-fns provides a simple and intu..
The error message "Module not found: Can't resolve 'fs'" in Next.js typically occurs when you are trying to import the 'fs' module, which stands for "file system," in a client-side (browser) context. However, the 'fs' module is a built-in Node.js module that is not available in the browser environment. Next.js is designed to be a framework for building server-rendered React applications, and it ..
Here are some examples of pages that are good candidates for SSG: Blog posts: Blog posts are typically static content that does not change frequently. SSG can be used to generate blog posts at build time, which can improve performance and ensure that your blog posts are indexed by search engines. Portfolios: Portfolios are another type of static content that can benefit from SSG. SSG can be used..
The and components in Next.js are both used to create hyperlinks, but they have some key differences. The component is a React component that extends the HTML element. It provides a number of features that are not available in the element, such as: Client-side navigation: The component can be used to perform client-side navigation, which means that the page will not be reloaded when the link is ..
In Next.js, API Routes provide a way to create serverless backend functionality within your Next.js applications. API Routes allow you to define server-side endpoints that can handle incoming HTTP requests, perform server-side operations, and return responses. This feature makes it easy to build API functionality directly into your Next.js application without the need for an external server. Her..
In Next.js, "shallow routing" refers to a technique that allows you to update the URL displayed in the browser's address bar without actually re-rendering the entire page. This means that only the content within the page component will be refreshed while preserving the state of the surrounding components. By default, when you navigate to a new page using Next.js' Link component or the router.pus..

Dynamic Routing pages/product/first-item pages/category/[slug].js => /category/:slug (ex. /category/food ) pages/[username]/info.js => /:username/info (ex. /youjun/info ) pages/cart/[...slug].js => /cart/* (ex. /cart/2022/06/24 ) useRouter / query Multiple Slug pages/[username]/[info].js const { username, info } = router.query pages/cart/[...slug].js const { slug } = router.query => array Option..
components/Layout.js Create a common component separately as a layout.js file in the component folder and apply it to pages/_app.js. pages/_app.js => Setting overall position in Component. import '@/styles/globals.css'; import Layout from '@/components/Layout'; export default function App({ Component, pageProps }) { const getLayout = Component.getLayout || ((page) => {page}); return getLayout();..
In Next.js, the Image component is a built-in component that provides optimized image loading and rendering. It is specifically designed to handle images and offers several features to improve performance, such as automatic image optimization, lazy loading, and responsive image support. The Image component is part of the next/image package, which is included by default in Next.js projects. Here'..
import Head from 'next/head'; import { Inter } from 'next/font/google'; import Link from 'next/link'; import { useEffect, useState } from 'react'; const inter = Inter({ subsets: ['latin'] }); export async function getStaticProps() { return { props: { time: new Date().toISOString() }, }; } export default function ISR({ time }) { return ( {time} ); } The data is updated when the page is refreshed.