Currently, next-connect works with API Routes only.
We need to add support for getInitialProps or better yet document middleware (https://github.com/zeit/next.js/issues/7208). They both share the same PageContext and can be implemented with one same approach.
Current implementation of nextConnect() returns a function with two argument. It is possible to approach it with withMiddleware() or useMiddleware() as in next-session.
Currently,
next-connect
works with API Routes only.We need to add support for
getInitialProps
or better yet document middleware (https://github.com/zeit/next.js/issues/7208). They both share the same PageContext and can be implemented with one same approach.Current implementation of
nextConnect()
returns a function with two argument. It is possible to approach it withwithMiddleware()
oruseMiddleware()
as innext-session
.