In newer versions of chrome you may not be able to just drag the code to your quick shortcuts. As a workaround you can just do:
--- | |
<a id="sources"></a> | |
## Markdown sources | |
**From this point, everything you see is formatted using Markdown syntax.** It will work in every editor that supports Markdown because it's an open standard on the web. There are two ways to find the sources for this page. | |
#### 1. On GitHub |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Add React in One Minute</title> | |
</head> | |
<body> | |
<h2>Add React in One Minute</h2> | |
<p>This page demonstrates using React with no build tooling.</p> |
Superior to similar solutions. Doesn't use electron or cgo. Easy communication between Go and Js. Can easily use libs like React, Vue and Angular.
This is a demo app using GUI library https://github.com/zserge/lorca which requires only Chrome and might even work with Firefox in the future.
I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.
But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.
Svelte is a language.
Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?
A few projects that have answered this question:
/* | |
Tailwind - The Utility-First CSS Framework | |
A project by Adam Wathan (@adamwathan), Jonathan Reinink (@reinink), | |
David Hemphill (@davidhemphill) and Steve Schoger (@steveschoger). | |
Welcome to the Tailwind config file. This is where you can customize | |
Tailwind specifically for your project. Don't be intimidated by the |
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"sync" | |
"time" | |
) |
export function todoMachine ({ contextKey, task, ...opts }) { | |
return { | |
...opts, | |
initial: 'run', | |
states: { | |
run: { | |
invoke: { | |
src: (ctx, event) => (fn) => { | |
const itemDone = (key) => (data) => { | |
fn({ type: 'itemDone', data: { key, data } }) |
- http://krasimirtsonev.com/blog/article/managing-state-in-javascript-with-state-machines-stent
- http://www.inf.ed.ac.uk/teaching/courses/seoc/2005_2006/resources/statecharts.pdf
- https://medium.com/@asolove/pure-ui-control-ac8d1be97a8d
- https://rauchg.com/2015/pure-ui
- https://css-tricks.com/robust-react-user-interfaces-with-finite-state-machines/
- http://krasimirtsonev.com/blog/article/getting-from-redux-to-state-machine-with-stent
- https://www.smashingmagazine.com/2018/01/rise-state-machines/
If you use server rendering, keep in mind that neither useLayoutEffect
nor useEffect
can run until the JavaScript is downloaded.
You might see a warning if you try to useLayoutEffect
on the server. Here's two common ways to fix it.
If this effect isn't important for first render (i.e. if the UI still looks valid before it runs), then useEffect
instead.
function MyComponent() {