A few questions about the new Adventure API

I have a few questions about using this new API, I will post them below. I will also add more questions if I can think of them.

  1. How are chat formats implemented now? In the past it was a String with two placeholders for the display name and message. I see there is a new renderer() method, but I’m not fully sure how to convert my old code to his new ChatRender.

  2. How do you replace text in components? There seems to be a TextReplacementConfig or Consumer, but I’m not sure how to use these either. Especially since I have some old code that just replaces a String with variables from PlaceholderAPI.

Thanks in advance to anyone that can provide assistance.