The backend returns some optional fields but you want to write a function that makes those optional fields nullable. Why? No apperent reason.
type Response = {
name: string;
age?: number;
{% if permalink == "/" %} | |
{% set canonicalUrl = metadata.canonicalUrl %} | |
{% else %} | |
{% set canonicalUrl = metadata.canonicalUrl + page.url %} | |
{% endif %} | |
<link rel="canonical" href="{{ canonicalUrl }}"> | |
{# Social meta #} | |
{% if section == "articles" %} | |
<meta property="og:type" content="blog"> | |
{% else %} |
license: lgpl-3.0 |
Tell us what was your approach with the project, i.e from the inspiration to the very first steps (sketches, tasks planning, design prototype, code prototype). Don't worry if the process was more "freestyle", if this is the case just describe how you wouly approach to a new project given an appropriate timeline.
Tell us about an interesting nontrivial bug/issue you encountered in your code and how you solved it, or if it's not solved yet, try to come up with a set of steps to fix it. It can be something related to external APIs, UI elements interactions, data visualization, build tooling etc..
Tell us about the library you used for the data visualizations and why you chose that one instead of others.
const canvasSketch = require('canvas-sketch'); | |
const { lerp } = require('./util/math'); | |
const settings = { | |
animate: true, | |
duration: 3, | |
dimensions: [ 640, 640 ], | |
scaleToView: true, | |
playbackRate: 'throttle', | |
fps: 24 |
Note:
When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.
If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code:
Bear with me while I think aloud about this (please comment there, not here!). Goals:
Let's start with a single store that is external to the component tree. Our top-level <App>
component connects to it:
Early/simplifed version of You Draw It: What Got Better or Worse During Obama’s Presidency
d3.drag is pretty great!
This gist had a far larger impact than I imagined it would, and apparently people are still finding it, so a quick update:
(async main(){...}())
as a substitute for TLA. This completely eliminates the blocking problem (yay!) but it's less powerful, and harder to statically analyse (boo). In other words the lack of TLA is causing real problemsI'll leave the rest of this document unedited, for archaeological