1import React, { createContext, forwardRef, useContext } from 'react';
3import usePointStore from './lib/usePointStore';
5export const PointCacheContext = createContext(null);
7export function PointCacheProvider({ children }) {
8 const cache = usePointStore();
11 <PointCacheContext.Provider value={cache}>
13 </PointCacheContext.Provider>
18export function usePointCache() {
19 return useContext(PointCacheContext);
23export const withPointCache = Component =>
24 forwardRef((props, ref) => (
25 <PointCacheContext.Consumer>
26 {cache => <Component ref={ref} {...cache} {...props} />}
27 </PointCacheContext.Consumer>
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list