nbrugger-tgm / reactj

A reactive ui lib for easy MVC
LaTeX Project Public License v1.3c
10 stars 0 forks source link

[Feature] Directives #14

Closed nbrugger-tgm closed 3 years ago

nbrugger-tgm commented 4 years ago

Directives

I want to incoperate features like the v-if from VueJS

Vue

<p v-if="percent == 100">
     Done!
</p>

Current Solution

JLabel label = new JLabel("Done!");
binder.bind("percent",label::setVisible,percent -> percent == 100);

Prefered solution

binder.showIf("percent",label::setVisible,percent -> percent == 100); //enforces boolean conversion
nbrugger-tgm commented 4 years ago

IF directive

Added in 539538cb81e9e9e5bf6fd4f3c0f32374703b1f37

nbrugger-tgm commented 3 years ago

Reiterated

Issue #42 (Custom DSL) makes this features unnecessary and will replace it.