How to show cookie consent alert on website


How should I show Cookie consent alert on web reactive application. There will be a button as "Allow". Once clicked by user, that cookie consent alert wont be shown. 

Should I use ""osVisit '  cookie for this. How should I access its value.  I am planning to set visible property of an container based on this cookie value.

Please suggest.