Skip to content

Instantly share code, notes, and snippets.

View soska's full-sized avatar
🏠
Working from home

Armando Sosa soska

🏠
Working from home
View GitHub Profile
@soska
soska / story.json
Created March 16, 2019 19:39
Story Example
This file has been truncated, but you can view the full file.
{
"result": {
"entity_type": "episode",
"slug": "alias-el-condor",
"versioned_slug": "alias-el-condor-v17",
"state": "review",
"title": "Alias el Cóndor",
"description": "Maracanã Stadium, Rio de Janeiro. September 3, 1989. The Chilean football team was playing the 1990 World Cup in Italy against Brazil. They needed the win, and Roberto Rojas, alias El Condor — Captain of the national team, goalkeeper and national idol — was willing to do anything to get it.",
"updated_at": "2019-02-24T19:28:08.914Z",
const defaultPluginOptions = {
extension: /\.worker.js$/,
};
const plugin = (config, pluginOptions, nextOptions) => {
const { extension } = pluginOptions;
config.module.rules.push({
test: extension,
use: [
@soska
soska / keeper.js
Created November 24, 2017 17:20
An idea for a simple component-based state manager
import { Component } from 'react';
class Keeper extends Component{
static defaultProps = {
initialState:{},
stateRoot:'keeper',
reducer:state=>state,
serialize:null
}
@soska
soska / test.js
Created March 11, 2017 01:55
testingscript
alert('testing');
@soska
soska / index.html
Created December 29, 2016 14:32 — forked from anonymous/index.html
Musical Chord Progression Arpeggiator
<article>
<aside id="aside"></aside>
<main id="main"></main>
</article>

How to use SASS with create-react-app

This will require only one dependency, and one line added to your package.json and it's super fast.

  1. Create an app wih create-react-app.
  2. Install node-sass.
  3. Create your base sass file inside src/sass.
  4. Add a new script to package json that will watch the file, process sass and compile it into src/css.
  5. Include the compiled css into React via require, this way your app will reload whenever the new css is compiled.
  6. ran the new script along with npm start.
@soska
soska / EditableValue.js
Created August 2, 2016 00:17
An editable div component
class EditableValue extends Component{
static defaultProps = {
onChange: ()=>{},
type: 'text'
};
constructor(props){
super(props);
@soska
soska / tabs.jsx
Created December 28, 2015 19:15
Tabs Component
import React, {Children, cloneElement} from 'react';
import cx from 'classnames';
export const Tabs = ({
onChange = () => {},
selectedIndex = 0,
TabListComponent = TabList,
children,
}) => {
@soska
soska / index.jsx
Created June 25, 2015 20:03
App Builder In React
'use strict';
const React = require('react');
const AdBuilder = React.createClass({
getInitialState(){
return {
creative : CreativeStore.getEmptyCreative(),
selectedWidget : null
}
@soska
soska / app.js
Last active August 29, 2015 14:23
silly react app
'use strict';
const React = require('react');
const App = React.createClass({
getInitialState(){
return {
hello : 'world'
};
},