figma.root.children | |
.flatMap(pageNode => pageNode.findAll(n => true)) | |
.forEach(node => { | |
if ('fills' in node && 'fillStyleId' in node) { | |
if (node.fills !== figma.mixed && node.fills.length > 0 && node.fillStyleId !== '') { | |
print(`${node.name}'s fill color is not linked to a style`); | |
} | |
} | |
if ('strokes' in node && 'strokeStyleId' in node) { | |
if (node.strokes.length > 0 && node.strokeStyleId !== '') { |
const components = figma.root.children.flatMap(pageNode => { | |
return pageNode.findAll(node => node.type === 'COMPONENT'); | |
}); | |
const styles = [ | |
...figma.getLocalEffectStyles(), | |
...figma.getLocalGridStyles(), | |
...figma.getLocalPaintStyles(), | |
...figma.getLocalTextStyles(), | |
]; |
import * as React from "react"; | |
import { Frame, PropertyControls, ControlType } from "framer"; | |
import { FrameProps } from "framer/types/src/render/presentation/Frame"; | |
export class Browser extends React.Component { | |
static defaultProps = { |
// AttributedString class from https://github.com/cohitre/attributedString.js | |
// Modifications made to support html tags & remove span wrapper from unstyled blocks | |
var AttributedString = (function () { | |
var aString | |
, StringRange | |
, RangesList | |
, HtmlSerializer | |
, plainStringSerializer | |
, _ = {} | |
, entityMap = { |
This is a proposal for a lightning talk at the Reactive 2015 conference.
NOTE: If you like this, star ⭐ the Gist - the amount of stars decides whether it makes the cut!
Relay makes data fetching in React apps simpler, by letting you declare the data needs of your components instead of writing complex imperative code. React, Relay, GraphQL and the other complementary tools are changing how apps are built.
2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).
// built files are found at /public/__build__/* | |
// how do I get `webpack` to build to `public/__build__/` | |
// but have the webpack dev server serve `public/index.html` | |
// and the bundles from `/__build__/`? | |
// | |
// I'm using this to run the server | |
// | |
// webpack-dev-server --inline --content-base public/ | |
// | |
// and this is my config: |
var STATE = { | |
books: new Backbone.Collection([], { | |
model: Models.BOOK_MODEL | |
}), | |
users: new Backbone.Collection([], { | |
model: Models.USER_MODEL | |
}), | |
categories: new Backbone.Collection([], { | |
model: Models.CATEGORY_MODEL | |
}) |
'use strict'; | |
var React = require('react'); | |
function createAsyncHandler(getHandlerAsync, displayName) { | |
var Handler = null; | |
return React.createClass({ | |
displayName: displayName, |