Skip to content

support "embedded expressions" #6

@genius257

Description

@genius257

inspired by JSX and Twig, support for embedded expressions would be sweet.
usage example: https://twig.symfony.com/doc/3.x/intro.html
A deep dive into the Twig source is needed, to find out if they do it in a way that can be used without writing and including a new PHP file (a problem that makes Laravel View implementation unusable).
This could also help with HTML encoding of output, by basically copying or requiring parts of Twig source.

example:

$view->render(['items' => [1, 2, 3]])
<App\Component\List items={{$items}} />

Biggest problem is that it would make it almost impossible to add intellisense to input data/types, in the ViewFile. But that may be irrelevant?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions