| name | explain-diff-html |
|---|---|
| description | Use when the user asks for a rich explanation of a code change, diff, branch, or PR. Produces HTML output. |
Please make me a rich, interactive explanation of the specified code change.
It should have these sections:
| import useScrollRestoration from "utils/hooks/useScrollRestoration"; | |
| const App = ({ Component, pageProps, router }) => { | |
| useScrollRestoration(router); | |
| return <Component {...pageProps} />; | |
| }; | |
| export default App; |
| import React, { useRef, useEffect, memo } from 'react' | |
| import { useRouter } from 'next/router' | |
| const ROUTES_TO_RETAIN = ['/dashboard', '/top', '/recent', 'my-posts'] | |
| const App = ({ Component, pageProps }) => { | |
| const router = useRouter() | |
| const retainedComponents = useRef({}) | |
| const isRetainableRoute = ROUTES_TO_RETAIN.includes(router.asPath) |
| export const h=(t,p,...c)=>({t,p,c,k:p&&p.key}) | |
| export const render=(e,d,t=d.t||(d.t={}),p,r,c,m,y)=> | |
| // arrays | |
| e.map?e.map((e,p)=>render(e,d,t.o&&t.o[p])): | |
| // components | |
| e.t.call?(e.i=render((render.c=e).t(Object.assign({children:e.c},e.p),e.s=t.s||{},t=> | |
| render(Object.assign(e.s,t)&&e,d,e)),t.i||d,t&&t.i||{}),d.t=t=e):( | |
| // create notes | |
| m=t.d||(e.t?document.createElement(e.t):new Text(e.p)), | |
| // diff props |
AWS 학습 링크집 시리즈
| //Set Variables | |
| $button-white: #ffffff; | |
| $button-green: #44ca00; | |
| $button-green-dark: #369a12; | |
| $button-blue: #a6d1f9; | |
| $button-blue-dark: #14283e; | |
| $button-gray: #eeeeee; | |
| $button-red: #9e0b0f; | |
| //Create Array |