Due to some performance issues, I plan to migrate the Record-Triggered flows to the Apex trigger code.
I wrote all the criteria logic and updated the records in the Before Insert and BeforeUpdate functions in trigger But here. i have confusion about writing logic based on the evaluation mentioned in the flow. Some of the flows has "Evaluate the rule when a record is created, and every time it's edited" and some of them mentioned as " Evaluate the rule when a record is created, and any time it's edited to subsequently meet criteria". How to migrate this evaluation logic in the apex trigger?