Hello David Thielen,
There is no direct way ( API ) to achieve this requirement. And I found a github issue about want to Add an API to tell you the current render mode. It seems that there are plans to add this feature in the future.
You also can find the workaround about checking the IsPrerendering property in your component.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best Regards
Jason