Skip to content

Using proxies in Nue.js #41

Answered by tipiirai
hichem-dahi asked this question in Q&A
Sep 21, 2023 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

The { title } expression gets compiled to a function like this (_) => _.title which is called by Nue JS on the client side. The _ variable is the proxy instance we talked about. The compiler is here:

https://github.com/nuejs/nuejs/blob/master/ssr/compile.js

And here is the exact spot where a variable is prefixed with the context:

https://github.com/nuejs/nuejs/blob/master/ssr/expr.js#L25

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@hichem-dahi
Comment options

@tipiirai
Comment options

Answer selected by hichem-dahi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants