From 34911a37cf2f8c0f2e83e6f2cf6598ba4f13935d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismael=20Mart=C3=ADnez?= Date: Mon, 23 Oct 2017 09:09:59 -0300 Subject: [PATCH] Fix with-amp example React v16 supports invalid DOM attributes now. ReactInjection and DOMProperty throws an error. Reference: #3152 --- examples/with-amp/pages/_document.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/examples/with-amp/pages/_document.js b/examples/with-amp/pages/_document.js index 264f228d22747..35e8811e5ce3a 100644 --- a/examples/with-amp/pages/_document.js +++ b/examples/with-amp/pages/_document.js @@ -1,16 +1,4 @@ import Document, { Head } from 'next/document' -import { DOMProperty } from 'react-dom/lib/ReactInjection' -import { properties as DOMProperties } from 'react-dom/lib/DOMProperty' - -// By default React limit the set of valid DOM elements and attributes -// (https://github.com/facebook/react/issues/140) this config whitelist -// Amp elements/attributes -if (typeof DOMProperties.amp === 'undefined') { - DOMProperty.injectDOMPropertyConfig({ - Properties: { amp: DOMProperty.MUST_USE_ATTRIBUTE }, - isCustomAttribute: attributeName => attributeName.startsWith('amp-') - }) -} export default class MyDocument extends Document { render () {