You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
carbon/components/ApiContext.js

11 lines
186 B
JavaScript

import React from 'react'
import api from '../lib/api'
const Context = React.createContext(api)
export function useAPI() {
return React.useContext(Context)
}
export default Context