Refactor renderedData in state.