concept presentational component in category react

This is an excerpt from Manning's book React in Action.
These two new categories of components (presentational and container) are really just two more-focused expressions of what your components are already doing. The difference between “any old” component and a presentation or container component is in what it does. Rather than allowing any component to handle styling, UI data, and application data, presentational components handle UI and UI-related data, and container components handle application data (à la Redux).
It’s important to understand the difference between containers and presentational components, but your application is still doing the same things it was doing with better separation of concerns. You haven’t introduced anything fundamentally new into the application with Redux; your React components will still receive props, maintain state, respond to events, and render with the same lifecycle as before. The key difference that react-redux provides is in integrating your store, reducers, and actions with your components. And the new divide between presentational and container components is just a pattern that can make your life easier.
Let’s look at these two general sorts of components used in a React app with a Redux architecture. As noted, presentational components are “UI-only” components. This means they should generally not have much to do with determining how application data is changed, updated, or emitted.
Here are some basics on presentational components:

This is an excerpt from Manning's book Redux in Action.
Presentational components don’t have dependencies on Redux. They don’t know or care that you’re using Redux to manage your application state. By using presentational components, you introduced determinism into your view renders. Given the same data, you’ll always have the same rendered output. Presentational components are easily tested and provide your application with sweet, sweet predictability.
Presentational components are great, but something needs to know how to get data out of the Redux store and pass it to your presentational components. This is where container components, such as App, come in. In this simple example, they have a few responsibilities:
Listing 9.19. Presentational component tests
import React from 'react'; import Enzyme, { shallow } from 'enzyme'; #1 import Adapter from 'enzyme-adapter-react-16'; import TaskList from '../components/TaskList'; #2 Enzyme.configure({ adapter: new Adapter() }); describe('the TaskList component', () => { it('should render a status', () => { const wrapper = shallow(<TaskList status="In Progress" tasks={[]} />); #3 expect(wrapper.find('strong').text()).toEqual('In Progress'); #4 }); it('should render a Task component for each task', () => { const tasks = [ { id: 1, title: 'A', description: 'a', status: 'Unstarted', timer: 0 [CA]}, { id: 2, title: 'B', description: 'b', status: 'Unstarted', timer: 0 [CA]}, { id: 3, title: 'C', description: 'c', status: 'Unstarted', timer: 0 [CA]} ] const wrapper = shallow(<TaskList status="Unstarted" tasks={tasks} />); expect(wrapper.find('Task').length).toEqual(3); #5 }); }); #1 Imports shallow from enzyme to mount the component #2 Imports the component to test #3 Uses Enzyme to mount the component for testing #4 Asserts that the DOM contains the right text values #5 Uses Enzyme to find the number of expected elements !@%STYLE%@! {"css":"{\"css\": \"font-weight: bold;\"}","target":"[[{\"line\":1,\"ch\":78},{\"line\":1,\"ch\":80}],[{\"line\":26,\"ch\":0},{\"line\":26,\"ch\":2}],[{\"line\":3,\"ch\":78},{\"line\":3,\"ch\":80}],[{\"line\":27,\"ch\":0},{\"line\":27,\"ch\":2}],[{\"line\":9,\"ch\":78},{\"line\":9,\"ch\":80}],[{\"line\":28,\"ch\":0},{\"line\":28,\"ch\":2}],[{\"line\":11,\"ch\":78},{\"line\":11,\"ch\":80}],[{\"line\":29,\"ch\":0},{\"line\":29,\"ch\":2}],[{\"line\":22,\"ch\":78},{\"line\":22,\"ch\":80}],[{\"line\":30,\"ch\":0},{\"line\":30,\"ch\":2}]]"} !@%STYLE%@!