No description
Find a file
Mohsen Azimi c67908c9a5
Upgrade react-with-styles to version 4 (#13193)
Currently failing because `withStyles` can't read the interface from context:


```
Unhandled Runtime Error
TypeError: Cannot read property 'createLTR' of undefined
webpack-internal:///./node_modules/react-with-styles/lib/withStyles.js (150:33)
```

Manually registering the interface resolves the issue:

```diff
diff --git a/examples/with-react-with-styles/pages/_app.js b/examples/with-react-with-styles/pages/_app.js
index 91d09a2a9..a393572b8 100644
--- a/examples/with-react-with-styles/pages/_app.js
+++ b/examples/with-react-with-styles/pages/_app.js
@@ -2,11 +2,16 @@ import App from 'next/app'
 import React from 'react'
 import WithStylesContext from 'react-with-styles/lib/WithStylesContext'
 import AphroditeInterface from 'react-with-styles-interface-aphrodite'
+import ThemedStyleSheet from 'react-with-styles/lib/ThemedStyleSheet'
 
 import defaultTheme from '../defaultTheme'
 
 class MyApp extends App {
+    constructor(props) {
+        super(props);
+        ThemedStyleSheet.registerInterface(AphroditeInterface)
+    }
   render() {
     const { Component, pageProps } = this.props
```

But that's not how it is documented. I'm following up with react-with-styles to see if this is a bug.
2020-05-22 17:54:36 +00:00
.github Migrate PR stats action into Next.js repo (#13177) 2020-05-21 14:07:27 +02:00
.vscode Add support for debugging Next.js core (#13101) 2020-05-20 03:18:02 +00:00
bench Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
docs Update custom server docs (#13172) 2020-05-22 19:19:36 +02:00
errors Add error when exporting pages with fallback: true (#13063) 2020-05-19 09:29:34 -04:00
examples Upgrade react-with-styles to version 4 (#13193) 2020-05-22 17:54:36 +00:00
packages Use memoizedPagechecker (#13191) 2020-05-22 17:37:54 +00:00
test Ignore nullish user configs (#10250) 2020-05-22 16:46:36 +00:00
.eslintignore Migrate PR stats action into Next.js repo (#13177) 2020-05-21 14:07:27 +02:00
.eslintrc.json Enable jest/no-try-expect (#13124) 2020-05-20 13:37:35 +02:00
.gitignore Migrate PR stats action into Next.js repo (#13177) 2020-05-21 14:07:27 +02:00
.npmrc Remove version prefix 2018-10-02 01:35:56 +02:00
.prettierignore Migrate PR stats action into Next.js repo (#13177) 2020-05-21 14:07:27 +02:00
.prettierignore_staged Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
.prettierrc.json Update Prettier configuration 2019-04-26 14:37:30 -04:00
azure-pipelines.yml Update to track test timings separate for Azure and Actions (#12083) 2020-04-21 16:11:04 -04:00
check-pre-compiled.sh Pre-ncc compiled packages to prevent re-nccing unnecessarily (#11569) 2020-04-07 09:42:16 -04:00
CODE_OF_CONDUCT.md Update Code of Conduct email address (#12108) 2020-04-22 16:27:24 +02:00
contributing.md Updated example template in contributing.md (#11968) 2020-05-02 00:47:48 -04:00
jest.config.js Use the jest-circus test runner (#12974) 2020-05-16 16:56:06 -04:00
lerna.json v9.4.2 2020-05-20 15:32:29 -04:00
license.md Update year on license files 2020-04-21 12:24:08 +02:00
lint-staged.config.js Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
package.json Migrate PR stats action into Next.js repo (#13177) 2020-05-21 14:07:27 +02:00
publish-release.sh Make sure to exit publish script with correct code (#10310) 2020-01-28 14:03:32 -05:00
readme.md Monorepo (#5341) 2018-10-01 01:02:10 +02:00
run-tests.js Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
test-file.txt Add additional file serving tests (#12479) 2020-05-04 11:58:19 -05:00
UPGRADING.md Move upgrading guide to /docs (#10727) 2020-02-28 23:46:18 +01:00
yarn.lock bug fixes for Lint routing (#13111) 2020-05-21 23:42:20 +00:00

Next.js

Getting Started

Visit https://nextjs.org/learn to get started with Next.js.

Documentation

Visit https://nextjs.org/docs to view the documentation.

Contributing

Please see our contributing.md.

Authors