How to render component differently in feed

Hello!

I trying to write a new page for my site. On this page I have a component that is a short snippet of php code that produces some text. For the atom feed I want it to insead return a static value. Is there a good way for the component to check if it is rendering in a normal page or in a feed?

I am using version 0.23.3

The component doesn’t know anything about what’s outside and the feed just takes the rendered content. No easy way to do that