Description
A new live-preview example, "Formulas in Action," has been added to the learn/guides/datahandling/StateProviders.md guide. This example visually demonstrates how formulas within State Providers automatically react to changes in their dependencies, making the concept of effect-based computed properties less abstract.
Changes Made
- Added a new
javascript live-preview code block and accompanying explanation under a new "Formulas in Action" sub-section.
- The example showcases
price, quantity, total, and discountedTotal data properties, with total and discountedTotal being formulas that react to changes in price and quantity.
- The
discountedTotal output is rounded to two decimal places for better readability.
Verification
Confirmed that the new live-preview example functions as expected within the documentation, demonstrating the reactive behavior of formulas.
Description
A new live-preview example, "Formulas in Action," has been added to the
learn/guides/datahandling/StateProviders.mdguide. This example visually demonstrates howformulaswithin State Providers automatically react to changes in their dependencies, making the concept of effect-based computed properties less abstract.Changes Made
javascript live-previewcode block and accompanying explanation under a new "Formulas in Action" sub-section.price,quantity,total, anddiscountedTotaldata properties, withtotalanddiscountedTotalbeing formulas that react to changes inpriceandquantity.discountedTotaloutput is rounded to two decimal places for better readability.Verification
Confirmed that the new live-preview example functions as expected within the documentation, demonstrating the reactive behavior of formulas.