Skip to content

Instantly share code, notes, and snippets.

View ajsmth's full-sized avatar

andy ajsmth

View GitHub Profile
@ajsmth
ajsmth / pager-setup.js
Created August 10, 2019 19:29
Pager Component -- Initial Setup
import React, { useState } from 'react'
// this component will be the focus of this series
// we will extend its functionality considerably throughout
// for now let's just setup the translations...
function Pager({ children, activeIndex }) {
// this will update when the activeIndex changes
// try updating activeIndex in devtools and see how the blue container changes position