Skip to content

No longer able to extend ServerSideRender #17000

@steveush

Description

@steveush

Describe the bug
Due to the changes made to extract the ServerSideRender package into a stand alone component any classes inheriting from it will break even after updating import statements. The issue is that ServerSideRender is now being wrapped in a withSelect which is then what is being exported in https://github.com/WordPress/gutenberg/blob/master/packages/server-side-render/src/index.js.

To reproduce
Steps to reproduce the behavior:

  1. Create a new component that extends ServerSideRender.
  2. Check the prototype.

Expected behavior
When importing the ServerSideRender component the actual component should be imported, not the withSelect wrapper.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Version: 76.0.3809.100

Additional context

  • Using Gutenberg 6.2 & WordPress 5.2.2

The standard ServerSideRender component is lacking in a lot of features and many blog posts can be found showing how to extend this component to add in those missing features. Personally this is going to effect only one of my own plugins but that alone has over 100k users so I can only assume there will be many others caught out by this change once it goes live.

If I've missed a simple way to import the actual component without its' wrapper please let me know.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions