Skip to content

Add a rend.with() function to add extra data #40

@treeder

Description

@treeder

You can currently add global data in Rend constructor.

new Rend({ layout, data: { x: y }})

But it would be nice to also allow to add data in middleware and things for a request.

eg:

c.data.rend = globals.rend.with({ new: 'data' })

Which would clone data and things while reusing some of the more expensive items like template cache.

Then you can of course add data when rendering too:

return c.data. rend.html({ other: 'data' })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions