I hereby claim:
- I am adnaan on github.
- I am adnaan (https://keybase.io/adnaan) on keybase.
- I have a public key ASAgzL2uEUiEMnnqLkRbqECnLs5vet2p2FQF23eFrf45HAo
To claim this, I am signing this object:
| import {createSlice} from "@reduxjs/toolkit"; | |
| import {asyncThunk, rx, asyncAction} from "./thunks"; | |
| import {identity} from "./identity"; | |
| export const fetchAccount = asyncThunk( | |
| "account", | |
| "fetchAccount", | |
| async (id, state) => { | |
| return identity.currentUser().attributes(); | |
| }); |
| { | |
| "labels": ["January", "February"], | |
| "datasets": [{ | |
| "label": "Data One", | |
| "backgroundColor": "#f87979", | |
| "data": [40, 20] | |
| }] | |
| } |
| import React from 'react'; | |
| import { StyleSheet, Text, View } from 'react-native'; | |
| import Centrifuge from 'centrifuge'; | |
| export default class App extends React.Component { | |
| componentDidMount() { | |
| console.log("componentDidMount") | |
| var timestamp = Math.floor(Date.now() / 1000); | |
| var centrifuge = new Centrifuge({ |
I hereby claim:
To claim this, I am signing this object:
| package main | |
| // Using a global dependency | |
| var userService user.Service | |
| func Init() { | |
| userService = user.NewService() | |
| } | |
| func GetComments() []Comment { | |
| var comments []Comment |
| /*@flow*/ | |
| import React from 'react'; | |
| import ProductList from './components/ProductList' | |
| import { connect } from 'react-redux'; | |
| const App = connect(({ products }) => ({ | |
| products | |
| }))(function(props) { | |
| return ( | |
| <div > |
| /*@flow*/ | |
| import React from 'react'; | |
| import Product from './Product'; | |
| function ProductList(props: { data: Array < { ID: number, title: string, vote: number } > , dispatch: Function }) { | |
| return ( | |
| <div > | |
| { | |
| props.data.map(product => <Product | |
| key={product.ID} |
| /*@flow*/ | |
| import React from 'react'; | |
| import FaCaretUp from 'react-icons/lib/fa/caret-up'; | |
| function Product(props: { id: number, title: string, vote: number, dispatch: Function }) { | |
| const { id, title, vote } = props; | |
| function handleVote() { | |
| props.dispatch({ | |
| type: 'products/vote', |
| /*@flow*/ | |
| import React from 'react'; | |
| import { Router, Route } from 'dva/router'; | |
| import dva from 'dva'; | |
| import App from './App'; | |
| import model from './model'; | |
| import './index.css'; | |
| const app = dva(); | |
| app.model(model); |
| import { getProducts, updateVote } from './services'; | |
| export default { | |
| namespace: 'products', | |
| state: { | |
| list: [], | |
| loading: false, | |
| }, | |
| subscriptions: { | |
| init({ dispatch }: { dispatch: Function }) { |