Skip to content

Feature request: Support server-side rendering of non-standard DOM attribute names (eg. AMP's [prop]="value") #10064

Closed
@cole-sanderson

Description

@cole-sanderson

Do you want to request a feature or report a bug?
Request a feature

I am working on project to build AMP page with React Server Side Rendering. I am having an issue to add custom attribute to built-in AMP element. In order to be able to use amp-bind we need to be able to output “bindings”, which are special attributes of the form [attribute], eg. [slide]="selectedSlide".

<amp-carousel 
    layout={layout}
    height={height}
    width={width}
    [slide]={slide}
>
        ...
</amp-carousel>

Here is AMP carousel example that work with amp-bind.

What is the current behavior?

  • Parsing error: Unexpected token [ (Fatal)

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

  • All

For more information, you can read all the discussion in this PR.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions