Skip to content

Instantly share code, notes, and snippets.

View atharva-bhange's full-sized avatar
👊
Focusing

Atharva Nitin Bhange atharva-bhange

👊
Focusing
View GitHub Profile
https://github.com/future-agi/simulate-sdk
https://github.com/future-agi/agent-opt
https://github.com/future-agi/ai-evaluation
https://colab.research.google.com/drive/1WDZkTzibz8E1hh-qUjcFmfrI1e7Qc5zP#scrollTo=cvEXBAm0chk_
https://colab.research.google.com/drive/1LouqoNecpcSPgFzfxW5Y07RXncrNd3QT#scrollTo=pXLIflmfbL7x
import {
SafeAreaView,
SafeAreaProvider,
} from 'react-native-safe-area-context';
import {
FlatList,
StyleSheet,
View,
} from 'react-native';
const App = () => {
const parentRef = useRef<HTMLDivElement | null>(null);
const firstRef = useRef<HTMLDivElement | null>(null);
const secondRef = useRef<HTMLDivElement | null>(null);
const resizerRef = useRef<HTMLDivElement | null>(null);
const mouseXCor = useRef(0);
const firstWidth = useRef(0);
const shouldDrag = useRef(false);
const onMouseDown = (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => {
@atharva-bhange
atharva-bhange / App.tsx
Created March 4, 2021 07:11
Calling Async action creators without using thunk or saga
// Calling a async action without using thunk or saga in the component itself
function mapDispatchToProps(dispatch: Dispatch<MyAction>): Pick<Props,'getPosts'> {
return: {
getPosts: async () => {return dispatch( getAction( await fetch('/stuff') ) );},
};
}