Authorize your React Components with Higher-Order Component

Caveat 😢 😢

Here we are authorizing the components based on UserRole stored in the localStorage which can be changed easily and can be replaced with Admin or anything. So we should have Authorization in our Back-end too in order to prevent data getting exposed to anyone trying to tamper the localStorage.

I am a fullStack developer building things at BigBinary using Ruby on Rails and React.js .

I am a fullStack developer building things at BigBinary using Ruby on Rails and React.js .