Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 1 KB

amp-bind-jsx-alt.mdx

File metadata and controls

19 lines (12 loc) · 1 KB
title description
Resolving "AMP Bind JSX Error" in Next.js
This document explains the "AMP Bind JSX Error" in Next.js and provides a valid solution to resolve it.

Why This Error Occurred

The "AMP Bind JSX Error" arises when you use the [prop]='something' syntax somewhere in your code.

JSX is a syntax extension for JavaScript used by React (and by extension, Next.js). JSX does not support the usage of this particular syntax, hence the error.

Possible Ways to Fix It

To fix this issue, instead of using [prop]='something', you can use data-amp-bind-prop='something'. This is a valid alternative in Accelerated Mobile Pages (AMP) that works well with JSX.

Useful Links