ComponentRenderer creation in V.24.6.0

I have decided to modify an application that I created 2 years ago in Vaadin 23.1 and upgrade it with the latest Vaadin version (24.6.0). When I loaded my code to IDE, I got a number of compilation errors. Those errors are caused by deprecation of some classes and methods.
I fixed most of them, except one type that I am confused about.
I have a Grid and five out of eight columns of it has renderers. In the v.23 I used default constructors for it and it worked fine for me. Now, default constructor is no longer available and I have to use one of four parametrized constructors defined in https://vaadin.com/api/platform/24.5.4/com/vaadin/flow/data/renderer/ComponentRenderer.html
I did not understand how It works and wasn’t able to find examples in the documentation.
For example, my grid displays information about books and I have I need a renderer for book authors column, that will display authors as unordered list. I have this class:

public class AuthorListRenderer extends ComponentRenderer<UnorderedList, Book> {

@Override
public UnorderedList createComponent(Book source) {
    Set<Author> authors = source.getAuthors();
    ListItem[] items = new ListItem[authors.size()];
    int i = 0;
    for (Author author : authors) {
        String item = ((author.getFirstName() == null) ? "" : (author.getFirstName() + " "))
                + author.getLastName() + ((author.getNickName() == null) ? "" : (" (" + author.getNickName() + ")"));
        ListItem listItem = new ListItem(item);
        listItem.getStyle().set("font-style", "italic");
        listItem.getStyle().set("white-space", "normal");
        items[i++] = listItem;
    }
    return new UnorderedList(items);
}

}

To fix the error I am adding this constructor:

public AuthorListRenderer(SerializableFunction<Book, UnorderedList> componentFunction) {
    super(componentFunction);
}

But now I need to replace this line:

this.booksTable.addColumn(new AuthorListRenderer());
and I can’t figure out what kind of function I need to create for the new constructor.

If someone can clarify it for me or at least provide a link to the proper section of the manual, I will appreciate it greatly.

Did you try?

public AuthorListRenderer() {
    super(AuthorListRenderer::createComponent);
}

Even tho I would say the following is way more simpler - don’t deal with the renderer at all: flow-components/vaadin-grid-flow-parent/vaadin-grid-flow-integration-tests/src/main/java/com/vaadin/flow/component/grid/it/GridViewUsingComponentsPage.java at 6da1b8f012c06abb81c144c51569f137bee06a60 · vaadin/flow-components · GitHub

It does not work. I added this constructor

public AuthorListRenderer() {
    super(AuthorListRenderer::createComponent);
}

and it gives me the following compilation error:

constructor com.vaadin.flow.data.renderer.ComponentRenderer.ComponentRenderer(com.vaadin.flow.function.SerializableSupplier<com.vaadin.flow.component.html.UnorderedList>) is not applicable
(argument mismatch; invalid method reference
method createComponent in class org.garik.encyclopedia.render.AuthorListRenderer cannot be applied to given types
required: org.garik.encyclopedia.model.Book
found: no arguments
reason: actual and formal argument lists differ in length)
constructor com.vaadin.flow.data.renderer.ComponentRenderer.ComponentRenderer(com.vaadin.flow.function.SerializableFunction<org.garik.encyclopedia.model.Book,com.vaadin.flow.component.html.UnorderedList>) is not applicable
(argument mismatch; invalid method reference
unexpected instance method createComponent(org.garik.encyclopedia.model.Book) found in unbound lookup)

Try this:

VirtualList item selection / click listener - #5 by rucko24

Or

        final SerializableBiConsumer<Div, YoutClassDtoOrEntity> imageRenderPhpCookie = (div, youtClassDtoOrEntity) -> {
            final Span spanPhpSessidDescription = new Span(" " + youtClassDtoOrEntity.getMessage());
            div.add(spanPhpSessidDescription);   
        };

        final Grid.Column<YoutClassDtoOrEntity> phpSessIdColumn = grid.addColumn(new ComponentRenderer<>(Div::new, imageRenderPhpCookie))
                .setHeader("Your-header")
                .setKey("key")
                .setWidth("200px")
                .setFlexGrow(1);