Skip to content

Instantly share code, notes, and snippets.

View miksansegundo's full-sized avatar

Miguel San Segundo miksansegundo

  • Ko Pha Ngan, Thailand
View GitHub Profile
@javivelasco
javivelasco / reactive-2016.md
Last active January 10, 2023 19:45
Proposal for lightning talk at Reactive Conf 2016

Please star ⭐️ the gist to help! This is a proposal for a ⚡️ talk at Reactive Conference.

Styling Components in React Toolbox 2

I wrote react-toolbox and presented it almost a year ago in lighning talk at Reactive Conf 2015 in Bratislava. At first it was just a proof of concept of a component library styled with CSS Modules and SASS. Now the project has grown quite a bit, and during this year there has been tons of changes and lessons learned.

Theming and customization is one of the most difficult and interesting problems to solve. For the first version we needed a custom Webpack loader to generate themes and doing simple style overrides was very painful. Today I'm working on a new playground that will allow you try CSS Modules live, and to create React Toolbox themes on the f

@barneycarroll
barneycarroll / store.js
Created July 9, 2015 16:49
Little getter/setter for localStorage: store( 'name', 'barney' ); store( 'name' ) === 'barney'; store.delete( 'name' ); store.has( 'name' ) === false
// Get / setter for local storage
function store( key, value ){
if( arguments.length > 1 ){
localStorage.setItem( key, JSON.stringify( value ) )
return value
}
// Simultaneous getting / setting is bad.
// It is wasteful to continuously encode & then decompile JSON and never useful.
else {