Skip to content

Instantly share code, notes, and snippets.

View bobylito's full-sized avatar
🎩
JSing 🚀

Alex S bobylito

🎩
JSing 🚀
View GitHub Profile
@bobylito
bobylito / SimpleCustomSearchBox.js
Last active December 8, 2016 13:55
Simple custom SearchBox for react-instantsearch.
const MySearchBox = connectSearchBox(({currentRefinement, refine}) => {
return <input type="text" value={currentRefinement} onChange={(e) => refine(e.target.value)}/>;
});
@bobylito
bobylito / Connector_usage.js
Created July 3, 2017 11:27
[instantsearch.js v2] Connector usage sample
// custom `renderFn` to render the custom Menu widget
function renderFn(menuRenderingOptions, isFirstRendering) {
if (isFirstRendering) {
menuRenderingOptions.widgetParams.containerNode
.html('<select></select');
menuRenderingOptions.widgetParams.containerNode
.find('select')
.on('change', function(event) {
menuRenderingOptions.refine(event.target.value);
@bobylito
bobylito / common-npm-script.md
Created February 1, 2018 15:12
RFC: a list of commands for NPM script in InstantSearch projects

Standardized NPM commands for InstantSearch libraries

Pattern using commands

  • command: used for main commands
  • command:sub_command: used for commands related to a bigger command (build:umd is for buildbing

There should not probably be a third level.

Common commands:

@bobylito
bobylito / email.stories.tsx
Created October 13, 2023 05:12
React-email (resend) component in a StoryBook story
import { render } from "@react-email/render";
import type { Meta, StoryFn } from "@storybook/react";
import Email from "./email";
const meta: Meta<typeof Email> = {
title: "components/Email",
component: Email,
parameters: {
layout: "fullscreen",
},
@bobylito
bobylito / HowTo.md
Created April 13, 2024 15:08
Install NetBoot.xyz on FreshTomato

Install / use Netboot.xyz on a FreshTomato router

Prerequisites

  • FreshTomato based router (tested on 2024.1 on an ARM router)
  • a USB key (to store the file that will be served)

HowTo