Cells are reusable views. When they leave the visible screen they may be reused by the parent view for another sibling element. For this reason, we need to have some considerations in mind.

final class SomeCell: UITableViewCell {
	private var disposer = DisposeBag()

	private let someView = UIView().apply { ... }

	// MARK: Setup

	private func setup() {
		addSubview(someView)

		someView.snp.makeConstraints { ... }
	}

	// MARK: Configure

	public func configure(with model: Int) {
		disposer = DisposeBag()

		someView.backgroundColor = .clear

		switch model {
		case 0:
			someView.backgroundColor = .green

		case 1:
			someView.backgroundColor = .blue

		default:
			break
		}
	}
}