Write Channels as Components
Learn how to write channels as components.
Components
Components are the heart of React. The type of component that we’re most familiar with is a presentation component—this type of component renders the user interface and accepts input events from the user. Components do not need to have an interface, though. A container component can wire up logic, configure other components, pull data from other sources, or set up a context.
We use container components to separate the Phoenix code from the rest of the application. Without this separation, we could get by adding ...