- 02 10月, 2018 2 次提交
-
-
由 Tim Neutkens 提交于
-
由 Martin Beierling-Mutz 提交于
fixes #5355
-
- 01 10月, 2018 7 次提交
-
-
由 Tim Neutkens 提交于
As prepare is only needed to boot up the hot reloader + exportPathMap routes in development, it's not longer a requirement in the production server.
-
由 Tim Neutkens 提交于
-
由 Tim Neutkens 提交于
-
由 Evil Rabbit 提交于
-
由 Tim Neutkens 提交于
-
由 Carlos 提交于
* Add analyze-bundles example * housekeeping: with-webpack-bundle-analyzer example * analyze-bundles example: revert the version of faker library * analyze-bundles add analyze:server and analyze:browser to scripts * with-webpack-bundle-analyzer example: fix typo
-
由 Tim Neutkens 提交于
- Implements Lerna - Moves all source code into `packages/next` - Keeps integration tests in the root directory
-
- 29 9月, 2018 13 次提交
-
-
由 Tim Neutkens 提交于
-
由 Shu Ding 提交于
- `<details>` and `<ul>` cannot be inside `<p>` and it will not be parsed correctly by the MDX tokenizer. - `sh` is not a valid language name for syntax highlighting libs (e.g. [highlight.js](https://github.com/highlightjs/highlight.js/tree/master/src/languages)).
-
由 Tim Neutkens 提交于
-
由 Tim Neutkens 提交于
-
由 Tim Neutkens 提交于
-
由 Tim Neutkens 提交于
-
由 Tim Neutkens 提交于
-
由 Tim Neutkens 提交于
-
由 Henrik Wenz 提交于
We don't need to `React.cloneElement`, twice.
-
由 Henrik Wenz 提交于
This PR removes the obsolete `_containerProps` context.
-
由 Tim Neutkens 提交于
-
由 Carlos 提交于
### Next js 7+ and Typescript 3+ Example No babel, tsc, pure typescript usage Made by [next-with-typescript plugin](https://github.com/echoulen/next-with-typescript)
-
由 Tim Neutkens 提交于
-
- 28 9月, 2018 8 次提交
-
-
由 Mert Can 提交于
-
由 Tim Neutkens 提交于
* Remove obsolete check in dev-server * Don’t require package.json at runtime Inline the Next.js version at publish time, so that there’s no runtime dependency for this
-
由 Tim Neutkens 提交于
Remove `if(this.hotReloader)` as it's always guaranteed to be there. https://github.com/zeit/next.js/pull/5317#discussion_r221233064
-
由 Tim Neutkens 提交于
-
由 Tim Neutkens 提交于
* Initial dev server * Remove obsolete check * Move hotReloader to dev-server * Use parent renderErrorToHTML to remove dep on render.js * Remove dev option from server itself
-
由 Luc 提交于
* show warning if there is a title in _document.js Head * dont loop through children in production * only 1 loop through this.props.children
💪 * also raise warning in test env * check for null childs -
由 Yuri Yakovlev 提交于
-
由 Tim Neutkens 提交于
- This makes sure the Next.js renderer / server doesn't have a dependency on the `http` module. - Splits out util functions for SSR only - Removes obsolete methods / methods that weren't being tree-shaken
-
- 27 9月, 2018 6 次提交
-
-
由 Tim Neutkens 提交于
-
由 Tim Neutkens 提交于
-
由 Tim Neutkens 提交于
-
由 Tim Neutkens 提交于
-
由 Henrik Wenz 提交于
To work with babel7 & next7.
-
由 Arek Mytych 提交于
-
- 26 9月, 2018 4 次提交
-
-
由 Resi Respati 提交于
* [with-typescript] Updated `@zeit/next-typescript` and typescript typings * [with-typescript] Updated tsconfig to match new recommended config * [with-typescript] upgraded dependencies, implement type-checking * [with-typescript] add _document example, fixed tsconfig * [with-typescript] updated README * [with-typescript] updated example contents * [with-typescript] adopt the Layout component from Flow example
-
由 Henrik Wenz 提交于
An upstream bug in webpack-dev-middleware caused unhandled rejections to be swallowed.
-
由 Tim Neutkens 提交于
-
由 Matthew Francis Brunetti 提交于
Since version 2.1, react-apollo is exposing some new components that use the function-as-child (or render-prop) pattern to let you connect apollo-client magic with your components. See the blog article: [New in React Apollo 2.1](https://www.apollographql.com/docs/react/react-apollo-migration.html) If I'm not mistaken, it's generally agreed that this pattern is (where it works) superior to the HOC pattern, for reasons that are best explained here: https://cdb.reacttraining.com/use-a-render-prop-50de598f11ce So I updated the with-apollo example to use the new API, and IMO this code is much simpler and natural to read and understand, especially if you are not already familiar with Apollo's HOC APIs. I broke up my changes into separate commits, for easier review. Commits with "Refactor" in the message accomplish the goal of switching to the new APIs while minimizing line-by-line differences (select "Hide whitespace changes" under "Diff settings"). Commits with "Clean up" in the message follow up the refactoring with trivial things like reorganizing code sections, renaming variables, etc. For the components doing mutations, I chose not to use the `Mutation` component, since that doesn't really make sense to me; a mutation is something that happens at a point in time, so it's not meaningful to represent a mutation in the markup, which exists for a period of time. All that component does is expose a `mutate` function for a single specified mutation, and `result` data for a single firing of the mutation (which we don't need anyways; apollo handles updating the local data with the result). To me it seems simpler and more flexible to just get the apollo client via `ApolloConsumer` and call `.mutate()` on it. In case anyone is interested, here's what my version of `PostUpvoter` using the `Mutation` component looked like: <details> ```jsx import React from 'react' import { Mutation } from 'react-apollo' import { gql } from 'apollo-boost' export default function PostUpvoter ({ votes, id }) { return ( <Mutation mutation={upvotePost}> {mutate => ( <button onClick={() => upvote(id, votes + 1, mutate)}> {votes} <style jsx>{` button { background-color: transparent; border: 1px solid #e4e4e4; color: #000; } button:active { background-color: transparent; } button:before { align-self: center; border-color: transparent transparent #000000 transparent; border-style: solid; border-width: 0 4px 6px 4px; content: ''; height: 0; margin-right: 5px; width: 0; } `}</style> </button> )} </Mutation> ) } const upvotePost = gql` mutation updatePost($id: ID!, $votes: Int) { updatePost(id: $id, votes: $votes) { id __typename votes } } ` function upvote (id, votes, mutate) { mutate({ variables: { id, votes }, optimisticResponse: { __typename: 'Mutation', updatePost: { __typename: 'Post', id, votes } } }) } ``` </details> ### I'm happy with where things are at here, but I'm more than happy to address any comments, concerns, ideas for improvent! Thanks!
-