Getting Started
Install the dependencies
npm install --save scrimshaw-react
yarn add scrimshaw-react
Set up Client
import React from "react"
import ReactDOM from "react-dom"
import { Provider as ReduxProvider } from "react-redux"
import { Provider as ScrimshawProvider, Client } from "scrimshaw-react"
import App from "./components/app.js"
import configureStore from "./configure-store"
const client = new Client("http://api.example.com/graphql")
const store = configureStore()
ReactDOM.render(
<ScrimshawProvider client={client}>
<ReduxProvider store={store}>
<App />
</ReduxProvider>
</RequestClientProvider>
document.getElementById("root")
)
Add the reducer
import { combineReducers } from "redux"
import { reducer } from "scrimshaw"
export default combineReducers({
scrimshaw: reducer,
})