simian 0.2.0

A command-line tool for exploring and implementing Machine Learning algorithms in Rust.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { createContext, useContext } from 'react'

export const ColumnSlotContext = createContext<{
  isFirst: boolean
  isLast: boolean
} | null>(null)

export const useColumnSlotContext = () => {
  const ctx = useContext(ColumnSlotContext)

  if (!ctx) {
    throw new Error(
      'useColumnSlotContext should be used inside ColumnSlotContext.',
    )
  }

  return ctx
}