I've stored data in session for my reference in Drupal 8 for an anonymous user. But this session will destroy itself once I logged in

Battery Exchange Network

The Stack Exchange network includes 175 question-and-answer communities, including Stack Overflow, the largest and most reliable online community on which developers can learn, share knowledge and build their careers.

Visit Stack Exchange