Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
c0dc008f
Unverified
Commit
c0dc008f
authored
Feb 07, 2022
by
Gerald Monaco
Committed by
GitHub
Feb 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop exposing internal `render` and `renderError` methods from `next/client` (#34069)
These should no longer need to be exposed.
parent
81b537c0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
8 deletions
+4
-8
index.tsx
packages/next/client/index.tsx
+2
-2
next-dev.js
packages/next/client/next-dev.js
+1
-3
next.js
packages/next/client/next.js
+1
-3
No files found.
packages/next/client/index.tsx
View file @
c0dc008f
...
@@ -434,7 +434,7 @@ export async function initNext(
...
@@ -434,7 +434,7 @@ export async function initNext(
render
(
renderCtx
)
render
(
renderCtx
)
}
}
export
async function render(renderingProps: RenderRouteInfo): Promise
<
void
>
{
async function render(renderingProps: RenderRouteInfo): Promise
<
void
>
{
if
(
renderingProps
.
err
)
{
if
(
renderingProps
.
err
)
{
await
renderError
(
renderingProps
)
await
renderError
(
renderingProps
)
return
return
...
@@ -462,7 +462,7 @@ export async function render(renderingProps: RenderRouteInfo): Promise<void> {
...
@@ -462,7 +462,7 @@ export async function render(renderingProps: RenderRouteInfo): Promise<void> {
// This method handles all runtime and debug errors.
// This method handles all runtime and debug errors.
// 404 and 500 errors are special kind of errors
// 404 and 500 errors are special kind of errors
// and they are still handle via the main render method.
// and they are still handle via the main render method.
export
function renderError(renderErrorProps: RenderErrorProps): Promise
<
any
>
{
function renderError(renderErrorProps: RenderErrorProps): Promise
<
any
>
{
const
{
App
,
err
}
=
renderErrorProps
const
{
App
,
err
}
=
renderErrorProps
// In development runtime errors are caught by our overlay
// In development runtime errors are caught by our overlay
...
...
packages/next/client/next-dev.js
View file @
c0dc008f
import
{
initNext
,
version
,
router
,
emitter
,
render
,
renderError
}
from
'./'
import
{
initNext
,
version
,
router
,
emitter
}
from
'./'
import
initOnDemandEntries
from
'./dev/on-demand-entries-client'
import
initOnDemandEntries
from
'./dev/on-demand-entries-client'
import
initWebpackHMR
from
'./dev/webpack-hot-middleware-client'
import
initWebpackHMR
from
'./dev/webpack-hot-middleware-client'
import
initializeBuildWatcher
from
'./dev/dev-build-watcher'
import
initializeBuildWatcher
from
'./dev/dev-build-watcher'
...
@@ -44,8 +44,6 @@ window.next = {
...
@@ -44,8 +44,6 @@ window.next = {
return
router
return
router
},
},
emitter
,
emitter
,
render
,
renderError
,
}
}
initNext
({
webpackHMR
,
beforeRender
:
displayContent
})
initNext
({
webpackHMR
,
beforeRender
:
displayContent
})
.
then
(()
=>
{
.
then
(()
=>
{
...
...
packages/next/client/next.js
View file @
c0dc008f
import
{
initNext
,
version
,
router
,
emitter
,
render
,
renderError
}
from
'./'
import
{
initNext
,
version
,
router
,
emitter
}
from
'./'
window
.
next
=
{
window
.
next
=
{
version
,
version
,
...
@@ -7,8 +7,6 @@ window.next = {
...
@@ -7,8 +7,6 @@ window.next = {
return
router
return
router
},
},
emitter
,
emitter
,
render
,
renderError
,
}
}
initNext
().
catch
(
console
.
error
)
initNext
().
catch
(
console
.
error
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment