paint-brush
How to Define an Active Menu Item in a Phoenix Framework Through Short-Circuit Evaluationby@wevtimoteo
105 reads

How to Define an Active Menu Item in a Phoenix Framework Through Short-Circuit Evaluation

by Weverton TimoteoJanuary 3rd, 2024
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

In Elixir, **lazy evaluation** and **short-circuit evaluation** are often used interchangeably. This approach not only simplifies our code but also makes more straightforward maintenance. We use ternary expressions and string concatenation to conditionally define CSS classes.
featured image - How to Define an Active Menu Item in a Phoenix Framework Through Short-Circuit Evaluation
Weverton Timoteo HackerNoon profile picture
Weverton Timoteo

Weverton Timoteo

@wevtimoteo

L O A D I N G
. . . comments & more!

About Author

Weverton Timoteo HackerNoon profile picture
Weverton Timoteo@wevtimoteo

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite