## Motivation
The code before this PR had serveral issues:
1. Context uses reference identity to determine when to re-render, there are some gotchas that could trigger unintentional renders in consumers when a provider’s parent re-renders.
https://reactjs.org/docs/context.html#caveats
2. `setState` should use the reducer pattern in this example to make sure clicks are not swallowed by react batch.
* Add more pages to the 'blog' zone
- New dynamic page `pages/blog/post/[id].js`
- `pages/blog.js` moved to `pages/blog/index.js`
* Update Now and Next configs to support both `now dev` and `next dev`
- Set `assetPrefix` dynamically to either `/blog` or `''`.
- Update package.json scripts for both 'home' and 'blog' apps, support `yarn dev` in both of them.
* Update example description in README
* Fix formatting issues
* Make `/static` assets work in the 'blog' app
* Add routing rule for `/blog/static` to now.json
* Shorten README
I reverted it back to the state of 233152ee17 and then updated it with info on recent changes of the `with-zones` example.
* Use `continue: true` in now.json
Applies suggestions from code review.
Co-Authored-By: Joe Haddad <timer150@gmail.com>
* Fix JSON formatting
* Add routing rule for `_next` and `static` folders
* Update README of with-zones example slightly
Applies suggestions from code review.
Co-Authored-By: Joe Haddad <timer150@gmail.com>
* Remove unnecessary "dest" from `now.json`
Co-Authored-By: Joe Haddad <timer150@gmail.com>
* [with-firebase-authentication] remove deprecated warning
* [with-firebase-authentication] improve client and server credentials example
* [with-firebase-authentication] fix typo in the docs
* Simplify apollo setup
* Allow disabling of ssr in favor of automatic static optimization
- Converted Class to Function Component
- Added ssr config option
* Exclude @apollo/react-ssr from client bundle
* Remove WithApollo.getInitialProps from the client
* Remove displayName from production build
* Fix production switch
* Change export & fucntion naming
- Use named export
- Change function naming
* Warn if someone tries to use this HOC with _app.js
* Update dependencies
> Update dependencies
* Changes to make v3 work
> Use hook `useIntl` instead of HOC `injectIntl`
> Change use of class components
> Changes to dependencies
* Small changes
Small changes
* Remove _app from with-apollo example
This allows automatic static optimization for pages, that don’t need apollo.
* Rename with-apollo
Name should be same as hoc
* Adjust text to reflect latest changes
more info: 4321c469466160d13bcd52afa099385e84a112a0
* Replace worker-farm with jest-worker
* Apply suggestions from code review
Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>
* Remove semaphores on top of jest-worker, unwind
terser worker, and remove extra error log
* Adjust lib chunk naming algorithm and prevent duplicate react-dom
* Remove alias for react-dom and update separator replacement logic
* Add comment to webpack-config
* Add integration test for react-dom duplication
* Switch to using hash for lib chunk names
* remove extra file from PR
* Remove another extraneous change
* Remove test based on lib chunk name
* Update index.test.js
* Remove prefetch from with-apollo-and-redux-saga example
Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated
* Remove prefetch from using-inferno example
Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated
* Remove prefetch from with-apollo-and-redux example
Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated
* Remove prefetch from with-apollo-auth example
Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated
* Remove prefetch from with-tailwindcss example
Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated
* Remove prefetch from with-graphql-hooks example
Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated
* Remove prefetch from data-fetch example
Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated
* Check for TypeScript files for auto setup
This re-adds the behavior and only checks the `pages` directory for speed reasons.
* Adjust logic
* Handle not found too
* Tweak typescript test suite
* Revert "Tweak typescript test suite"
This reverts commit 9e0108da7c70e7ae45b412b60c07162383de65f3.
* Make sure HMR connection isn't being closed
while testing
* Update to not re-use NODE_ENV
* Break up/rework TypeScript test suite
* bump
* Add deprecation warning for App Container
* Apply suggestions from code review
Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>
* Tweak for more dead-code elimination
* Add warning when empty object is returned
from getInitialProps
* Apply suggestions from code review
Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>
* Apply suggestions from code review
Co-Authored-By: Jan Potoms <potoms.jan@gmail.com>
* Adjust lib chunk naming algorithm and prevent duplicate react-dom
* Remove alias for react-dom and update separator replacement logic
* Add comment to webpack-config
* Add experimental optimizeLibraries flag, currently prunes Moment.js locales
* expose moment for use in assertion
* try with the same setup as the production integration test
* Apply optimiztaions in dev and on server so they're consistent.
* fix build (oh dear)
* Update index.test.js
* Rename flag to future.excludeDefaultMomentLocales
* Adjust impl
* Add package.json to with-zones example
So that create-next-app works.
* Update README – no need to run `yarn` / `npm i`
This example doesn't have any dependencies in its package.json,
everything is handled by running `now dev`.