收藏本版 |订阅

Next.js论坛 今日: 0|主题: 296|排名: 78 

  • react.js vs next.js 客户端渲染, 服务端渲染
    客户端渲染,相当于软件公司接到项目,驻场开发,人都去工厂,边调研,边开发。   服务器渲染,是在公司写代码;然后,pm拿着代码部署。 来源:https://www.cnblogs.com/maoyan/p/16572652.html
    0259 乐在艺中 发表于 2022-8-10 Next.js论坛
  • Vue.js开发:打包时报错Browserslist: caniuse-lite is outdated. Please run next command `npm update caniuse-lite browserslist`
    一、问题如下   Browserslist: caniuse-lite is outdated. Please run next command `npm update caniuse-lite browserslist`   意思是caniuse-lite已经过时了。请运行下一个命令' npm update caniuse-lite browserslist '。      但是在终端执行提示的命令却是无效,重新打包时依旧会出现该提示。 二、问题处理   ...
    0351 中国南平 发表于 2022-8-9 Next.js论坛
  • LeetCode 206 Reverse Linked List 反转链表
    // 递归处理, 利用函数作用域操作当前节点和当前节点的下一个节点 const reverseList = head => { if (head == null || head.next == null) return head const end = reverseList(head.next) head.next.next = head head.next = null return end // 返回最后一个节点,也就是反转后的头节点 }; const ...
    0301 橘子家的大喵 发表于 2022-7-19 Next.js论坛
  • React SSR & Next.js In Action
    React SSR & Next.js In Action Next.js https://github.com/vercel/next.js#readme https://nextjs.org/ SWC Speedy Web Compiler https://swc.rs/ https://github.com/swc-project/swc/discussions Create Next App https://nextjs.org/docs/api-reference/create-next-app $ npx create-next-app@latest # or $ ...
    0218 惜惜 发表于 2022-7-18 Next.js论坛
  • Next.js 热更新 Markdown 文件变更
    Next.js 提供了 Fast-Refresh 能力,它可以为您对 React 组件所做的编辑提供即时反馈。 但是,当你通过 Markdown 文件提供网站内容时,由于 Markdown 不是 React 组件,热更新将失效。 怎么做 解决该问题可从以下几方面思考: 服务器如何监控文件更新 服务器如何通知浏览器 浏览器如何更新页面 如何拿到最新的 Markdown 内 ...
    0369 媚丶 发表于 2022-6-24 Next.js论坛
  • Next.js的页面预渲染
    Next.js的页面预渲染有两种形式 静态生成 在需要页面预渲染的js文件中 export async function getStaticProps(context) { //通知next.js页面需要预渲染的属性 //xxx操作 return { props:{},//props属性 revalidate: number, //至少多少秒进入此页面重新静态预渲染,增量静态生成 notfound: boolean, //是否跳转404 redire ...
    0188 王华山 发表于 2022-6-8 Next.js论坛
  • vue之登录权限
    router.js // 全局路由导航守卫 router.beforeEach((to, from, next) => { const tokenStr = localStorage.getItem('token') if (to.path === '/main' && !tokenStr) { // 证明用户要访问后台主页 next('/login') } else { // 访问的不是后台主页 next() } })   来源:https://www.cnblogs.c ...
    0318 悬壶山人 发表于 2022-6-8 Next.js论坛
  • js iterator protocol & next() All In One
    js iterator protocol & next() All In One .next() // Satisfies both the Iterator Protocol and Iterable const myIterator = { next: function() { // ... }, [Symbol.iterator]: function() { return this; } }; iterator protocol 迭代器协议 // .next() // .next().value // .next().do ...
    0202 弓长良 发表于 2022-6-7 Next.js论坛
  • [Next.js] Override the Default Next.js Document
    The Document is like the top level HTML structure of your Next.js application. You can use document to change the default language, set favicon; Because Document only render on Server side, so it doesn't support event such as onClick.... pages/_document.txs import { Html, Head, Main, NextScript } fr ...
    0281 三工区曹到儿 发表于 2022-5-24 Next.js论坛
  • [Next.js] Override the Default App Component in Next.js
    You can override the default App component in Next.js by creating a _app.tsx file and defining your own App component. By doing this, you can use global styles, pass custom props, and more. pages/_app.tsx import type {AppProps} from "next/app"; const App = ({Component, pageProps ...
    0272 起生 发表于 2022-5-24 Next.js论坛
  • [Next.js] Serve Optimized Images Using the Next.js Image Component
    The image component from Next.js comes with excellent performance optimizations that make it worth using. It comes with improved performance, better visual stability, faster page loads, and more! In this lesson you’ll learn how to use this component to serve both local and remote images in your Nex ...
    0217 逛青楼 发表于 2022-5-24 Next.js论坛
  • 关于Next.js项目启动后页面空白(控制台报错)问题的排查
    初始化Next.js工程项目后,打开开发环境下的默认地址,页面空白,打开控制台出现如下错题信息: Uncaught TypeError: Cannot read properties of undefined (reading 'forEach') 让人一脸茫然。。 因为是刚初始化的项目,代码也没有改动,所以直接去网上查找相似问题。 最后,将引起问题的原因聚焦到了React的浏览器开发调 ...
    0264 宝总 发表于 2022-5-8 Next.js论坛
  • LeetCode每日一练【24】
    Swap Nodes in Pairs 我的提交 介绍 罗里吧嗦 思路 循环遍历链表 交换两个节点 找到下两个节点,继续进行交换 代码 /* * @Author: fox * @Date: 2022-05-05 08:01:04 * @LastEditors: fox * @LastEditTime: 2022-05-05 10:04:31 * @Description: https://leetcode.com/problems/swap-nodes-in-pairs/ */ /** * @de ...
    0224 消失的岛 发表于 2022-5-5 Next.js论坛
  • Next.js 在 Serverless 中从踩坑到破茧重生
    本文作者:杨苏博 偏后端的全栈开发,目前负责腾云扣钉的 Cloud Studio 产品。对 WebIDE 领域中的 VS Code 和 Theia IDE 有深入研究与丰富实践;多年 Serverless 领域从业经验,是 Serverless First Malagu 开源框架的作者;热爱开源,敢于创新。 前言 Next.js 是由 Vercel 团队研发的一款全栈应用开发框架,我们使用 Nex ...
    0261 饶志恒 发表于 2022-4-26 Next.js论坛
  • vue导航守卫
    main.js router.beforeEach((to, from, next) => { let token = sessionStorage.getItem('token') if (to.meta.require) { if (token) { // 允许进入 next() } else { // 跳登录 } } else { next() } }) router.js { path: '/demo', name: 'demo' component: () => imp ...
    0201 东哈俄伊朝族永赢 发表于 2022-4-15 Next.js论坛
  • [Next.js] Add Middleware to an API Route Created with next-connect
    We'll learn how to create a middleware function for next-connect. This middleware will work at the route level, for example, for every request that hits the /api/next-connect-middleware endpoint, or at the HTTP verb level, GET /api/next-connect-middleware import nextConnect from 'next-connect' con ...
    0195 小梅笑哈哈 发表于 2022-4-3 Next.js论坛
  • [Next.js] Create an API Route Using the next-connect Package
    We'll learn an alternative way of creating API routes using the next-connect package. next-connect gives us an alternative that would feel familiar to anyone that has worked with Express in the past. https://github.com/hoangvvo/next-connect import nextConnect from "next-connect" const handler = ...
    0256 战斗鸡 发表于 2022-4-3 Next.js论坛
  • next.js
    参考:https://nextjs.org/learn/foundations/from-react-to-nextjs/getting-started-with-nextjs next.js是react的一个前端框架。react本质上是一个UI库,用于操作虚拟DOM。next.js是基于react的一个前端框架,类似于springboot,有很多约定俗成的配置。 1 不用脚手架创建next.js项目 在一个空路径下面创建package.json,内 ...
    0256 小麻子 发表于 2022-3-31 Next.js论坛
  • js使用reduce对数组求和
    let arr = [3, 4, 5, 2, 1]; let sum = arr.reduce((pre, next) => { pre += next; return pre; }, 0) console.log('结果:', sum); 这是我的签名 来源:https://www.cnblogs.com/zxcv123/p/16070778.html
    0264 亭亭玉霖 发表于 2022-3-29 Next.js论坛
  • Next.js的Babel及拆包优化
    1 Babel兼容   1.2 Babel按需加载规则(useBuiltIns)   在Babel>7的条件下,支持通过useBuiltIns参数来实现按需加载必要的垫片。   useBuiltIns=false   不会自动引入垫片。   useBuiltIns=entry   通过@babel/preset-env插件,按照浏览器环境按需加载需要的模块来替换对core-js的直接引用 ...
    0218 新能源李陈更 发表于 2022-3-21 Next.js论坛
  • 下一页 »

    快速发帖

    还可输入 180 个字符
    您需要登录后才可以发帖 登录 | 立即注册

    本版积分规则

    圆梦公社,专注于为全球华人提供纯粹技术交流的地方,请勿发布任何政治及违法的言论。如有相关侵权、举报、投诉及建议等,请发 E-mail:dzh188@hotmail.com

    Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

    在本版发帖返回顶部