Salesforce Platform Developer I (legacy) — Question 123
Which two are best practices when it comes to component and application event handling? (Choose two.)
Answer options
- A. Reuse the event logic in a component bundle, by putting the logic in the helper.
- B. Use component events to communicate actions that should be handled at the application level.
- C. Handle low-level events in the event handler and re-fire them as higher-level events.
- D. Try to use application events as opposed to component events.
Correct answer: A, C
Explanation
Option A is correct because reusing event logic in a helper promotes cleaner code and better organization. Option C is also correct as it allows for a more structured event flow by handling low-level events and promoting higher-level events. Options B and D are not best practices; while they have valid uses, they do not align with the recommended approaches for effective event handling.