Skip to content

Instantly share code, notes, and snippets.

View aminpaks's full-sized avatar
👟
Rolling

Amin Pakseresht aminpaks

👟
Rolling
View GitHub Profile

React Auth API

Looking at these two examples which one is better in your opinion, and why?

Pure hook

import {usePolicy} from 'shared/authorization';
import {productPolicy} from 'products';

...
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your bin description]">
<script src="https://unpkg.com/react@15.2.1/dist/react.min.js"></script>
<script src="https://unpkg.com/react-dom@15.2.1/dist/react-dom.min.js"></script>
<script src="https://unpkg.com/redux@^3.5.2/dist/redux.min.js"></script>
<script src="https://unpkg.com/react-redux@4.4.5/dist/react-redux.min.js"></script>
<script src="https://unpkg.com/@reactivex/rxjs/dist/global/Rx.js"></script>
<script src="https://unpkg.com/redux-observable/dist/redux-observable.min.js"></script>