This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import _ from 'lodash'; | |
/* | |
HOC to feed breakpoints data to child component. | |
Breakpoint data is based on Bootstrap's breakpoints | |
Using lodash throttle to optimize the high rate of events being fired. | |
*/ | |
export const Breakpoints = (WrappedComponent) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from "react"; | |
type ItemType = { | |
id: Number; | |
title: String; | |
children: Array<Number>; | |
}; | |
// Each "ItemType" element in the array have a array of children ID's. These refer | |
// to a ItemType. |
OlderNewer