일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- bitcoin
- CLASS
- CSS
- concept
- graphQL
- web
- HTML
- express.js
- Props
- built in object
- useState
- error
- REACT
- 기준
- nextJS
- Ethereum
- typeScript
- Redux
- solidity
- Interface
- node.js
- SSR
- JavaScript
- middleware
- hardhat
- API
- blockchain
- tailwindcss
- 삶
- evm
- Today
- Total
목록전체 글 (375)
ReasonJun
In React, "shallow compare" and "deep compare" refer to different approaches for comparing the values of props and state to determine if a component should re-render. Shallow Compare: Shallow comparison, which is the default behavior in React, involves comparing the prop and state values by their references. When using shallow comparison, React checks if the references of the current props and s..
React.memo To fix the comparison method used by React.memo for prop comparison, you can provide a custom comparison function as the second argument to React.memo. This custom comparison function determines whether the component should be re-rendered by comparing the previous props with the next props. The custom comparison function receives two arguments: prevProps and nextProps. It should retur..
React.memo is a higher-order component (HOC) provided by React that aims to optimize functional components by preventing unnecessary re-renders. It is similar to the PureComponent class component optimization but designed for functional components. By wrapping a functional component with React.memo, React will automatically memoize the component and only re-render it if its props have changed. I..

App.js code : import { useEffect, useState } from 'react'; import './App.css'; import B from './components/B'; import A from './components/A'; function App() { const [value, setValue] = useState(''); const [posts, setPosts] = useState([]); useEffect(() => { fetch('https://jsonplaceholder.typicode.com/posts') .then((res) => res.json()) .then((posts) => setPosts(posts)); }, []); return ( setValue(..
JSONPlaceholder is a free online REST API that provides mock data for testing and prototyping purposes. It allows developers to simulate various HTTP endpoints and obtain JSON responses similar to a real API. JSONPlaceholder is commonly used by developers who need to interact with an API during development without the need for a complete backend implementation. Here are some key features and cha..
In React, useEffect is a hook that allows you to perform side effects in functional components. Side effects can include fetching data from an API, subscribing to events, manipulating the DOM, and more. The useEffect hook is similar to lifecycle methods such as componentDidMount, componentDidUpdate, and componentWillUnmount in class components. The useEffect hook takes two arguments: a function ..

React Developer Tools is a browser extension available for Google Chrome that provides developers with a set of helpful tools for inspecting, debugging, and profiling React applications. It is designed specifically for developers working with React, a popular JavaScript library for building user interfaces. Here are some key features and functionalities of React Developer Tools: Profiling and Pe..
JSX key is a special attribute used in React.js when rendering lists of elements. When rendering multiple elements or components in a loop, React requires each item to have a unique "key" prop. The key prop helps React keep track of the individual items in the list and efficiently update and reorder them when necessary. The key prop should be assigned a unique identifier for each item in the lis..
Higher-Order Components (HOCs) are a design pattern in React that allow for code reuse, logic abstraction, and component composition. HOCs are functions that take a component as input and return an enhanced version of that component with additional functionality or props. Here's an example to illustrate the concept of an HOC: // Higher-Order Component const withLogger = (WrappedComponent) => { r..
Hooks are a feature introduced in React 16.8 that allows you to use state and other React features without writing a class. They provide a way to add stateful logic to functional components, making it easier to reuse and organize your code. Hooks are designed to enable better code reuse, composition, and readability in React applications. Using Hooks: import React, { useState } from 'react'; con..