betaFeedback

WorksComputer Science

On the Expressive Power of Hook-Indexed State: Comprehending State in the React UI Library (Extended Version)

Abstract

React is currently the most popular JavaScript library for front-end web development. It endows UI components with state via the useState construct, through a mechanism that we name hook-indexed state. However, React's implementation of hook-indexed state is both fragile and poorly understood. Programmers frequently experience unexpected behavior, and the benefits of programming in this paradigm are wholly unclear. We define λhookreactλ^\mathsf{react}_\mathsf{hook}, a core calculus that captures the essence of hook-indexed state, and give it a type system to statically rule out unexpected behavior. We then translate λhookreactλ^\mathsf{react}_\mathsf{hook} into a calculus λrefreactλ^\mathsf{react}_\mathsf{ref} based on ML-style references, and prove that this translation preserves typability and semantics, thus showing that hook-indexed state is expressible in terms of standard references. The translation is local and admits a compositional definition, but involves significant code duplication. As well as illuminating the essence of state in React, our observations can inform the design of future reactive programming systems.

Introduction

React is a JavaScript library that enables programmers to declaratively specify dynamic user interfaces (UIs). It is currently the most popular library for front-end web development [48, 49], and has influenced the development of other widespread libraries and frameworks, such as Preact and NextJS. Through the React Native project, React-style programming is also now common in mobile app development.

React programmers structure UIs in terms of components, which are functions that compute and return HTML-like elements. Although basic components are pure functional specifications, React provides the useState function to persist some internal state across rerenders (re-evaluations) of components. The useState construct is one of a number of primitive hooks, which “hook into” React’s runtime: in this case, useState coordinates with the runtime to inject the most recent state value, and to rerender the necessary components when that value is updated.

We develop a formal understanding of this widely-used but under-studied state mechanism, which we name hook-indexed state. In prior work, Lee et al. [26] give a semantics for React, intended as a guide for React developers. In contrast, we study useState from a language designer’s perspective. We examine how a language designer may integrate a version of hook-indexed state with static soundness guarantees into a reactive language. We also explore why a designer would consider hook-indexed state by relating it to standard ML-style state.

Soundness. To the novice React developer, useState may appear magically simple, but they will inevitably discover that what underlies this magic is in fact a fragile contraption, held together only by duct-tape invariants. If useState is placed inside a conditional statement, the program will crash. Updating state during a render may lead to an infinite rerender. To avoid such problems as these, programmers must obey the “Rules of React” [36], a set of React-specific maxims (e.g. “only

Authors’ Contact Information: Toby Ueno, [email protected], The University of Edinburgh, Edinburgh, UK; Ezra Cooper, [email protected], The University of Edinburgh, Edinburgh, UK; Simon Fowler, [email protected], University of Glasgow, Glasgow, UK; Sam Lindley, [email protected], The University of Edinburgh, Edinburgh, UK. call hooks at the top level”) that lead to bugs and unexpected behavior when broken, but which are not statically enforceable on the language level.1

We introduce a calculus, λhookreact\lambda^{\mathrm{react}}_{\mathrm{hook}}, that captures the essence of hook-indexed state while abstracting away from the chaotic real-world semantics of JavaScript [21] and complicating orthogonal features/performance concerns of React [26, 31]. We endow λhookreact\lambda^{\mathrm{react}}_{\mathrm{hook}} with a novel type system, featuring lightweight effect typing and pseudo-linearity of pointers. Our type system captures and enforces the informal Rules of React that pertain to state.

Expressivity. The useState construct has an unorthodox dynamic context-dependent semantics. During the initial render of the component, it uses the provided argument as an initial value, but on successive renders, it must instead access some location on the heap [37]. This observation was first formalized by Lee et al. [26], and is likewise modeled in our calculus λhookreact\lambda^{\mathrm{react}}_{\mathrm{hook}}.

To elucidate the pros and cons of programming with useState, we consider what it takes to express hook-indexed state in terms of a more well-understood canonical model of state. We show by translation that the behavior of useState is expressible in terms of ML-style first-class references, which have a well-studied formalization [3, 22, 46, 53] and are built-in to ML dialects such as OCaml [28], F# [50], and SML [40]. We define a calculus of first-class references, λrefreact\lambda^{\mathrm{react}}_{\mathrm{ref}}, and an encoding of λhookreact\lambda^{\mathrm{react}}_{\mathrm{hook}} into λrefreact\lambda^{\mathrm{react}}_{\mathrm{ref}} which satisfies a tight operational correspondence [19, 20, 41, 45, 51, 52]. The benefits and drawbacks of our translation are somewhat nuanced. Our encoding admits a compositional definition, and is local in that unrelated constructs are unaffected. However, it leads to code duplication and breaks abstraction, which shows an advantage of useState as a feature.

Contributions. Our primary contributions are summarized as follows.

  • We propose three reactive calculi: λpurereact\lambda^{\mathrm{react}}_{\mathrm{pure}} (§ 3), λhookreact\lambda^{\mathrm{react}}_{\mathrm{hook}} (§ 5), and λrefreact\lambda^{\mathrm{react}}_{\mathrm{ref}} (§ 7). Each has a sound type system and a small-step operational semantics.

    • λpurereact\lambda^{\mathrm{react}}_{\mathrm{pure}} is stateless, and as such can only represent static elements, but is equipped with the machinery necessary to support stateful components.

    • λhookreact\lambda^{\mathrm{react}}_{\mathrm{hook}} extends λpurereact\lambda^{\mathrm{react}}_{\mathrm{pure}} with hook-based stateful components, in the style of React. Its type system notably features a lightweight effect system and a pseudo-linear pointer context.

    • λrefreact\lambda^{\mathrm{react}}_{\mathrm{ref}} extends λpurereact\lambda^{\mathrm{react}}_{\mathrm{pure}} with reference-based stateful components, in the style of ML.

  • We define a translation from λhookreact\lambda^{\mathrm{react}}_{\mathrm{hook}} to λrefreact\lambda^{\mathrm{react}}_{\mathrm{ref}} (§ 8), prove that the translation is type-preserving, and show a tight operational correspondence between the two calculi.

  • We demonstrate that λhookreact\lambda^{\mathrm{react}}_{\mathrm{hook}} offers a scalable foundation by sketching three extensions: reconciliation, the useEffect hook, and custom hooks (§ 9).

Section 2 contains a more detailed exposition of React and useState and an overview of our findings. Section 8 surveys related work and Section 9 concludes.

Overview

Programming with React

React programmers structure UIs in terms of components, which are ordinary JavaScript functions that return elements. Elements are datatypes that specify HTML: they consist of text literals, tagged nodes (e.g. <div>, <p>), and components themselves. A complete program consists of a single root element that is rendered by the React runtime.

The Hello component below takes one parameter, name, and formats it into an element. We write this element as pseudo-HTML directly in JavaScript via the JSX syntax extension [38]. We may then use Hello in other components: the Main component below uses Hello twice with different1: React has a linter plugin [33] that can help catch Rule violations but which, as a linter, cannot guarantee soundness. parameters. If we designate Main as the root of our program, React’s runtime will instantiate the component by evaluating it and its subcomponents, yielding the HTML on the right.

const Hello = ({name}) => {
  const s = "Hello, ";
  return (
    <p>{s + name + "!"}</p>
  );
}
const Main = () => {
  return (<div class="foo">
    <Hello name="reader" />
    <Hello name="world" />
  </div>);
}
(Rendered HTML)
<div class="foo">
  <p>"Hello, reader!"</p>
  <p>"Hello, world!"</p>
</div>

The above program is entirely static as it is unchanged by user input. The power of React lies in how the system dynamically responds to events. In this paper, we primarily focus on a single kind of event, clicks, although our system easily extends to others (following e.g. [15]).

React supports primitive event handlers that can be attached to tags. We can provide the onClick attribute with an event handler function, which the runtime executes whenever the <div> is clicked. However, for these event handlers to affect the output of a React application, components must maintain state that event handlers can update. How do we model this state? JavaScript features mutable variables, introduced via the let keyword, but these cannot concisely capture the desired semantics. As a running example, consider a counter that displays its current value and, when clicked, increments that value. If we model this value as a local mutable variable, as in CounterLocal below, then x remains 0 after a click. This is because React rerenders the component by rerunning the function, rebinding x to its initial value.

const CounterLocal = () => { let x = 0; return (<div onClick={() => x = x + 1}>{x}</div>); }

We can persist the state across rerenders by hoisting x outside the function body, making it global.

let x = 0; const CounterGlobal = () => { return (<div onClick={() => x = x + 1}>{x}</div>); }

Alas, this style breaks when we instantiate the component multiple times. Updating x affects all instances of CounterGlobal, but each counter instance should maintain its own independent state.

React’s solution is the primitive useState hook, which coordinates with the runtime to maintain a local state cell across rerenders of the same component instance. The hook is parameterized by the initial state and returns both a value and a setter, the latter of which triggers a rerender when invoked. Upon rendering, useState returns the most recent state value. A correct implementation of a counter using useState is given by component Counter below: we can instantiate Counter in multiple places, and each will have its own local state value that persists across rerenders.

const Counter = () => { const [x, setX] = useState(0);
  return (<div onClick={() => setX (x + 1)}>{x}</div>); }

Local State, by Hook or by Crook

Hooks such as useState are superficially simple, but beneath the veneer lie complex and fragile internals. Programmers must adhere to the statically unenforceable Rules of React [36], lest they encounter one of many program-breaking pitfalls—we examine two of these pitfalls—inconsistent hook evaluation order and top-level setter calls—to see how useState leads to unexpected behavior.

Evaluation Order. Consider the following OutOfOrder code.

1  const OutOfOrder = () => { const [x, setX] = useState(true);
2                              if (x) { const [y, setY] = useState(0); }
3                              const [z, setZ] = useState("foo"); ...

On the first render, all three useState calls bind initial values true, 0, and "foo" to x, y, and z, respectively. However, if x is set to false and the component is rerendered, then z will be bound to 0. In React, useState calls are identified by their evaluation order with respect to a component instance, e.g. the first useState call sets/retrieves from the same place on the heap [37]. We refer to React’s state mechanism as hook-indexed state because the location of the state cell is indexed by the evaluation order of the corresponding hook. In OutOfOrder, the second such call is made at line 2 on the first render, but at line 3 on the second render, leading to the described bug.

To avoid this bug, React programmers must ensure that their hooks always respect the same evaluation order during each run of their components. This evaluation-order invariant is captured by the top-level restriction of the Rules of React, which states that hooks should only be called at the top level of components, i.e. not nested inside of conditionals, loops, and so on2. This restriction ensures that the execution order of all useState calls is consistent, thereby avoiding the above bug.

Top-Level Setter Calls. The state values returned from useState are immutable, and so must be set using the provided setter. This setter, however, does not work like a standard reference update, as evidenced by the following component.

const CounterTwo = () => { const [x, setX] = useState(0); setX (x + 2);
  return (<div onClick=() => setX (x + 1)> {x} </div>); }

CounterTwo only differs from Counter by the addition of the call to setX (x + 2). One might quite naturally assume that x is rendered with value 2, whereas in fact CounterTwo will not terminate.

If React detects that a setter is invoked during rendering, it will immediately attempt to rerender the component. As the setter call in CounterTwo is evaluated unconditionally, React will attempt this rerender indefinitely. Intuitively, React does this because it wants to avoid rendering stale state, but this behavior may easily catch the novice React programmer off guard.

Another Rule of React states that components should be pure, in that they should not perform side effects (but may perform, for instance, local mutation). Interestingly, React’s notion of purity does not preclude calling a state setter: the guidelines only caution against doing so unconditionally [34]. As with the other Rules, this invariant must be manually verified by the programmer.

A Core Calculus of Hook-Indexed State

In § 5, we propose a calculus, λhookreact\lambda^{\mathrm{react}}_{\mathrm{hook}}, which captures the essence of hook-indexed state. We draw inspiration from the work of Lee et al. [26], but where their system prioritizes semantic faithfulness to React in all its glory, we design our language around safety and (relative) simplicity. We introduce component bodies DD, which are wrapped into values as component {D}\{D\}. The grammar of component bodies is as follows, where VV are values and M,NM,N are computations:

D::=val⁡ V∣let⁡ x=M in⁡ D∣let⁡ x,xset=useState⁡ V in⁡ DD ::= \operatorname{val}\ V \mid\operatorname{let}\ x = M\ \operatorname{in}\ D \mid\operatorname{let}\ x,x_{\mathrm{set}} = \operatorname{useState}\ V\ \operatorname{in}\ D

Bodies extend computations with the useState construct. This body-computation distinction syntactically enforces the top-level restriction: the prior OutOfOrder example, for instance, is syntactically invalid, as if-statements can only take the form if VV then MM else NN, and not if VV then D1D_1 else D2D_2.

To give useState a small-step operational semantics, we must provide two key pieces of context.

  • We provide a pointer pp to a component instance’s memory, which contains its state. We need this pointer to distinguish the state of different instantiations of the same component.

  • We provide a phase ϕ\phi, which is either Init (initial phase) or Succ (successor phase). When ϕ=Init\phi= \mathrm{Init}, useState initializes state, and when ϕ=Succ\phi= \mathrm{Succ}, useState retrieves state.

We define the body semantics via step judgment ⇝pb\leadsto^{\mathrm{b}}_{p}, which captures this context. Consider the first useState call in Counter. In λhookreact\lambda^{\mathrm{react}}_{\mathrm{hook}}, that line evaluates as follows in the Init phase:

H0;let⁡ x,xset=useState⁡ℓ 0 in⁡ D⇝pInitD[0/x,xsetℓ/xset];H1\mathcal{H}_0; \operatorname{let}\ x,x_{\mathrm{set}} = \operatorname{useState}^{\ell}\ 0\ \operatorname{in}\ D \leadsto^{\mathrm{Init}}_{p} D[0/x,x_{\mathrm{set}}^{\ell}/x_{\mathrm{set}}]; \mathcal{H}_1

where H0\mathcal{H}_0 is the initial heap and set⁡pℓ\operatorname{set}^{\ell}_{p} is a setter for the ℓ\ellth evaluated hook at pointer pp. (For convenience, we annotate useState constructs with unique labels ℓ\ell in an elaboration pass: our syntax guarantees that these labels correspond to evaluation order.) The initial value 0 is bound to xx, and is also saved on the updated heap H1\mathcal{H}_1. We also bind a setter to xsetx_{\mathrm{set}}.

Suppose later we evaluate a setter, perhaps in the event handler for Counter. Doing so is an ordinary computation, and does not require the extra context given to bodies in the step judgment.

H1;set⁡pℓ⇝val⁡();H2\mathcal{H}_1 \mathrel{;} \operatorname{set}^{\ell}_{p} \leadsto\operatorname{val} () \mathrel{;} \mathcal{H}_2

Now, say we rerender Counter, which requires us to evaluate its body in the Succ phase. We disregard the initial value and look up the most recent value in H2\mathcal{H}_2, which is now 1, and bind it to xx.

H2;let⁡x,xset=useState⁡0ℓin⁡D⇝pSuccD[1/x,set⁡pℓ/xset];H2\mathcal{H}_2 \mathrel{;} \operatorname{let} x, x_{\mathrm{set}} = \operatorname{useState}^{\ell}_{0} \operatorname{in} D \mathrel{\leadsto^{\mathrm{Succ}}_{p}} D[1/x,\operatorname{set}^{\ell}_{p}/x_{\mathrm{set}}] \mathrel{;} \mathcal{H}_2

The Typing Rules of React

The syntactic restrictions of λhookreact\lambda^{\mathrm{react}}_{\mathrm{hook}} get us only so far towards safety: for instance, the Succ phase becomes stuck at a useState call if the corresponding location on the heap has not yet been initialized. To statically eliminate such problems, we introduce a type system to λhookreact\lambda^{\mathrm{react}}_{\mathrm{hook}} (§ 5.2) and prove it sound. Here we briefly survey its salient features.

Every Body Has a Type. The type of a body is a record L\mathcal{L} that maps useState labels ℓ\ell to value types AA. For example, in the typing derivation for Counter, an instance of rule TB-State records that the state at label ℓ\ell will have type Int once useState is executed (where ∅\varnothing is the empty record):

Γ⊢0:IntΓ,x:Int,xset:(Int⟶Mut1)⊢D:∅Γ⊢let⁡x,xset=useState⁡0ℓin⁡D:(ℓ:Int)TB-State\frac{\Gamma\vdash0 : \mathrm{Int} \qquad\Gamma, x : \mathrm{Int}, x_{\mathrm{set}} : (\mathrm{Int} \mathrel{\stackrel{\mathrm{Mut}}{\longrightarrow}} 1) \vdash D : \varnothing}{\Gamma\vdash\operatorname{let} x, x_{\mathrm{set}} = \operatorname{useState}^{\ell}_{0} \operatorname{in} D : (\ell: \mathrm{Int})} \quad\mathrm{TB\text{-}State}

When a useState construct is evaluated, it disappears from the body, and so a body’s type changes during evaluation. Once a body reduces to a value, it has type ∅\varnothing. (We defer discussion of the Mut annotation on the function arrow until later in this section.)

The Two-Body Problem. The type of a component instance’s memory is also given by L\mathcal{L}. Each instance memory contains a state store σ\sigma that maps labels ℓ\ell to values VV. If ℓ:A∈L\ell: A \in\mathcal{L}, then VV has type AA, as expected. For a body with type L1\mathcal{L}_1 and an instance memory with type L2\mathcal{L}_2, we compare L1\mathcal{L}_1 and L2\mathcal{L}_2 to obtain an invariant that depends on ϕ\phi as follows:

  • When ϕ=Init\phi= \mathrm{Init}, we maintain that L1∪L2\mathcal{L}_1 \cup\mathcal{L}_2 is constant. All state labels ℓ\ell in dom⁡(L1∪L2)\operatorname{dom}(\mathcal{L}_1 \cup\mathcal{L}_2) are either on the heap (if ℓ∈dom⁡L2\ell\in\operatorname{dom}\mathcal{L}_2) or to be initialized (if ℓ∈dom⁡L1\ell\in\operatorname{dom}\mathcal{L}_1). Once the body has reduced to a value, we have L1=∅\mathcal{L}_1 = \varnothing, and the component instance is fully initialized.

  • When ϕ=Succ\phi= \mathrm{Succ}, we maintain that L1⊆L2\mathcal{L}_1 \subseteq\mathcal{L}_2. All labels in the body must already be on the heap so that we can safely retrieve them via useState.

We illustrate the Init-phase invariant by returning to our Counter example. We zoom in from the entire heap H\mathcal{H} to just the relevant store σ\sigma, which begins empty, and so has type ∅\varnothing.

∅;let⁡x,xset=useState⁡0ℓin⁡D⇝pInitD[0/x,set⁡pℓ/xset];ℓ↦0\varnothing\mathrel{;} \operatorname{let} x, x_{\mathrm{set}} = \operatorname{useState}^{\ell}_{0} \operatorname{in} D \mathrel{\leadsto^{\mathrm{Init}}_{p}} D[0/x,\operatorname{set}^{\ell}_{p}/x_{\mathrm{set}}] \mathrel{;} \ell\mapsto0

After a step, the store ℓ↦0\ell\mapsto0 now has type (ℓ:Int)(\ell: \mathrm{Int}), but the body DD has type ∅\varnothing. Although the types have changed, their union, which was our invariant, has not. Now that all state cells in Counter have been initialized, it is safe to rerender Counter, i.e., to evaluate its body in the Succ phase. This also follows from our typing invariants. To begin Succ-phase evaluation, we require that L1⊆L2\mathcal{L}_1 \subseteq\mathcal{L}_2, which is true in this instance: both are equal to (ℓ:Int)(\ell: \mathrm{Int}).

Every Instance Has a Phase. We embed body evaluation into normal computation via the runtime construct [D0]⇓pϕD[D_0] \mathrel{\Downarrow^{\phi}_{p}} D, read as “initial body D0D_0 has evaluated to DD at phase ϕ\phi and pointer pp.” When ϕ=Init\phi= \mathrm{Init}, evaluating this computation may set some memory at pp, as described above. Now, consider the following computation, which initializes DD twice at pp.

let y=⌈D0⌉↓pInit(let x,xset=useStateℓ0 in …) in⌈D0⌉↓pInit(let x,xset=useStateℓ1 in …)\begin{aligned} \text{let } y = \left\lceil D_0 \right\rceil\mathrel{\downarrow_{p}^{\mathrm{Init}}} \left(\text{let } x, x_{\mathrm{set}} = \mathrm{useState}^{\ell} 0 \text{ in } \ldots\right) \text{ in}\\ \left\lceil D_0 \right\rceil\mathrel{\downarrow_{p}^{\mathrm{Init}}} \left(\text{let } x, x_{\mathrm{set}} = \mathrm{useState}^{\ell} 1 \text{ in } \ldots\right) \end{aligned}

Once the first initialization is complete, we expect that the state store contains value 0 at label ℓ\ell, and that this remains unchanged unless a setter is called. However, the second initialization will overwrite the first, leading to unexpected behavior. We thus choose to forbid reinitialization and guarantee that every component instance is initialized exactly once.

To enforce this restriction, we introduce a phase context Φ\Phi that maps pointers pp to phases ϕ\phi. We define a non-standard context merging relation Z\mathrel{\mathbin{\mathsf{Z}}} on Φ\Phi: we treat pointers with ϕ=Init\phi= \mathrm{Init} linearly, whereas pointers with ϕ=Succ\phi= \mathrm{Succ} are unrestricted. The typing rule TC-EvalI for construct ⌈D0⌉↓pϕD\left\lceil D_0 \right\rceil\mathrel{\downarrow_{p}^{\phi}} D guarantees that p:Initp : \mathrm{Init} occurs in Φ\Phi, meaning that no other computation in the derivation may refer to pp in the phase context. The above expression is therefore untypeable (denoted by an ✗\mathsf{✗} right of the conclusion), since we cannot merge the phase contexts Φ1\Phi_1 and Φ2\Phi_2:

References

  1. [1]Martín Abadi. 1998. Protection in Programming-Language Translations. In Automata, Languages and Programming, 25th International Colloquium, ICALP’98, Aalborg, Denmark, July 13-17, 1998, Proceedings (Lecture Notes in Computer Science, Vol. 1433), Kim Guldstrand Larsen, Sven Skyum, and Glynn Winskel (Eds.). Springer, 868–883. doi:10.1007/BFb0055109DOI
  2. [2]Amal Ahmed and Matthias Blume. 2011. An equivalence-preserving CPS translation via multi-language semantics. In Proceeding of the 16th ACM SIGPLAN international conference on Functional programming, ICFP 2011, Tokyo, Japan, September 19-21, 2011, Manuel M. T. Chakravarty, Zhenjiang Hu, and Olivier Danvy (Eds.). ACM, 431–444. doi:10.1145/2034773.2034830DOI
  3. [3]Amal J. Ahmed. 2004. Semantics of types for mutable state. Ph.D. Dissertation. https://www.proquest.com/dissertations-theses/semantics-types-mutable-state/docview/305149066/se-2
  4. [4]Hendrik Pieter Barendregt. 1985. The lambda calculus - its syntax and semantics. Studies in logic and the foundations of mathematics, Vol. 103. North-Holland.
  5. [5]Adam Chlipala. 2015. Ur/Web: A Simple Model for Programming the Web. In Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2015, Mumbai, India, January 15-17, 2015, Sriram K. Rajamani and David Walker (Eds.). ACM, 153–165. doi:10.1145/2676726.2677004DOI
  6. [6]Will Crichton and Shriram Krishnamurthi. 2024. A Core Calculus for Documents: Or, Lambda: The Ultimate Document. Proc. ACM Program. Lang. 8, POPL (2024), 667–694. doi:10.1145/3632865DOI
  7. [7]Evan Czaplicki. 2016. A Farewell to FRP. https://elm-lang.org/news/farewell-to-frp
  8. [8]Evan Czaplicki. 2026. Elm - delightful language for functional web applications. https://www.elm-lang.org
  9. [9]Evan Czaplicki and Stephen Chong. 2013. Asynchronous functional reactive programming for GUIs. In ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’13, Seattle, WA, USA, June 16-19, 2013, Hans-Juergen Boehm and Cormac Flanagan (Eds.). ACM, 411–422. doi:10.1145/2491956.2462161DOI
  10. [10]Olivier Danvy, Kevin Millikin, and Lasse R. Nielsen. 2007. On one-pass CPS transformations. J. Funct. Program. 17, 6 (2007), 793–812. doi:10.1017/S0956796807006387
  11. [11]N.G de Bruijn. 1972. Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem. Indagationes Mathematicae (Proceedings) 75, 5 (1972), 381–392. doi:10.1016/1385-7258(72)90034-0DOI
  12. [12]Conal Elliott and Paul Hudak. 1997. Functional Reactive Animation. In Proceedings of the 1997 ACM SIGPLAN International Conference on Functional Programming (ICFP ’97), Amsterdam, The Netherlands, June 9-11, 1997, Simon L. Peyton Jones, Mads Tofte, and A. Michael Berman (Eds.). ACM, 263–273. doi:10.1145/258948.258973DOI
  13. [13]Matthias Felleisen. 1991. On the Expressive Power of Programming Languages. Sci. Comput. Program. 17, 1-3 (1991), 35–75. doi:10.1016/0167-6423(91)90036-WDOI
  14. [14]Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, and Shriram Krishnamurthi. 2009. A functional I/O system or, fun for freshman kids. In Proceedings of the 14th ACM SIGPLAN international conference on Functional programming, ICFP 2009, Edinburgh, Scotland, UK, August 31 - September 2, 2009, Graham Hutton and Andrew P. Tolmach (Eds.). ACM, 47–58. doi:10.1145/1596550.1596561DOI
  15. [15]Simon Fowler. 2020. Model-View-Update-Communicate: Session Types Meet the Elm Architecture. In 34th European Conference on Object-Oriented Programming, ECOOP 2020, Berlin, Germany (Virtual Conference), November 15-17, 2020 (LIPICS, Vol. 166), Robert Hirschfeld and Tobias Pape (Eds.). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 14:1–14:28. doi:10.4230/LIPIcs.ECOOP.2020.14DOI
  16. [16]Simon Fowler, Loïc Denuzière, and Adam Granicz. 2015. Reactive Single-Page Applications with Dynamic Dataflow. In Practical Aspects of Declarative Languages - 17th International Symposium, PADL 2015, Portland, OR, USA, June 18-19, 2015, Proceedings (Lecture Notes in Computer Science, Vol. 9131), Enrico Pontelli and Tran Cao Son (Eds.). Springer, 58–73. doi:10.1007/978-3-319-19686-2_5DOI
  17. [17]Soichiro Fujii, Shin-ya Katsumata, and Paul-André Mellies. 2016. Towards a Formal Theory of Graded Monads. In Foundations of Software Science and Computational Structures - 19th International Conference, FOSSACS 2016, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2016, Eindhoven, The Netherlands, April 2-8, 2016, Proceedings (Lecture Notes in Computer Science, Vol. 9634), Bart Jacobs and Christof Löding (Eds.). Springer, 513–530. doi:10.1007/978-3-662-49630-5_30DOI
  18. [18]Marco Gaboardi, Shin-ya Katsumata, Dominic A. Orchard, Flavien Breuvart, and Tarmo Uustalu. 2016. Combining effects and coeffects via grading. In Proceedings of the 21st ACM SIGPLAN International Conference on Functional Programming, ICFP 2016, Nara, Japan, September 18-22, 2016, Jacques Garrigue, Gabriele Keller, and Eijiro Sumii (Eds.). ACM, 476–489. doi:10.1145/2951913.2951939DOI
  19. [19]Daniele Gorla. 2010. Towards a unified approach to encodability and separation results for process calculi. Inf. Comput. 208, 9 (2010), 1031–1053. doi:10.1016/J.IC.2010.05.002DOI
  20. [20]Robert Griesemer, Raymond Hu, Wen Kokke, Julien Lange, Ian Lance Taylor, Bernardo Toninho, Philip Wadler, and Nobuko Yoshida. 2020. Featherweight go. Proc. ACM Program. Lang. 4, OOPSLA (2020), 149:1–149:29. doi:10.1145/3428217DOI
  21. [21]Arjun Guha, Claudiu Saftoiu, and Shriram Krishnamurthi. 2010. The Essence of JavaScript. In ECOOP 2010 - Object-Oriented Programming, 24th European Conference, Maribor, Slovenia, June 21-25, 2010. Proceedings (Lecture Notes in Computer Science, Vol. 6183), Theo D’Hondt (Ed.). Springer, 126–150. doi:10.1007/978-3-642-14107-2_7DOI
  22. [22]Robert Harper. 1994. A Simplified Account of Polymorphic References. Inf. Process. Lett. 51, 4 (1994), 201–206. doi:10.1016/0020-0190(94)90120-1DOI
  23. [23]Shin-ya Katsumata. 2014. Parametric effect monads and semantics of effect systems. In The 41st Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’14, San Diego, CA, USA, January 20-21, 2014, Suresh Jagannathan and Peter Sewell (Eds.). ACM, 633–646. doi:10.1145/2535838.2535846DOI
  24. [24]Satoru Kawahara and Yukiyoshi Kameyama. 2020. One-Shot Algebraic Effects as Coroutines. In Trends in Functional Programming - 21st International Symposium, TFP 2020, Krakow, Poland, February 13-14, 2020, Revised Selected Papers (Lecture Notes in Computer Science, Vol. 12222), Aleksander Byrski and John Hughes (Eds.). Springer, 159–179. doi:10.1007/978-3-030-57761-2_8
  25. [25]Andrew Kennedy. 2006. Securing the .NET programming model. Theor. Comput. Sci. 364, 3 (2006), 311–317. doi:10.1016/J.TCS.2006.08.014DOI
  26. [26]Jay Lee, Joongwon Ahn, and Kwangkeun Yi. 2025. React-Trace: A Semantics for Understanding React Hooks: An Operational Semantics and a Visualizer for Clarifying React Hooks. Proc. ACM Program. Lang. 9, OOPSLA2 (2025), 471–498. doi:10.1145/3763067DOI
  27. [27]Xavier Leroy. 2009. A Formally Verified Compiler Back-end. J. Autom. Reason. 43, 4 (2009), 363–446. doi:10.1007/S10817-009-9155-4DOI
  28. [28]Xavier Leroy, Damien Doligez, Alain Frisch, Jacques Garrigue, Didier Rémy, KC Sivaramakrishnan, and Jérôme Vouillon. 2025. The OCaml system release 5.4: Documentation and user’s manual. Intern report. Inria. 1107 pages. https://inria.hal.science/hal-00930213
  29. [29]Paul Blain Levy, John Power, and Hayo Thielecke. 2003. Modelling environments in call-by-value programming languages. Inf. Comput. 185, 2 (2003), 182–210. doi:10.1016/S0890-5401(03)00088-9DOI
  30. [30]Sam Lindley. 2025. Encoding Product Types. In Proceedings of the Workshop Dedicated to Olivier Danny on the Occasion of His 64th Birthday (Singapore, Singapore) (OLIVERFEST ’25). Association for Computing Machinery, New York, NY, USA, 142–151. doi:10.1145/3759427.3760375DOI
  31. [31]Magnus Madsen, Ondrej Lhoták, and Frank Tip. 2020. A Semantics for the Essence of React. In 34th European Conference on Object-Oriented Programming, ECOOP 2020, Berlin, Germany (Virtual Conference), November 15-17, 2020 (LIPIcs, Vol. 166), Robert Hirschfeld and Tobias Pape (Eds.). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 12:1–12:26. doi:10.4230/LIPICS.ECOOP.2020.12DOI
  32. [32]Meta Platforms, Inc. 2026. API Reference: Hooks: useState. https://react.dev/reference/react/useState. Accessed: 2026-07-05.
  33. [33]Meta Platforms, Inc. 2026. Lints: eslint-plugin-react-hooks. https://react.dev/reference/eslint-plugin-react-hooks. Accessed: 2026-07-02.
  34. [34]Meta Platforms, Inc. 2026. Lints: set-state-in-render. https://react.dev/reference/eslint-plugin-react-hooks/lints/set-state-in-render. Accessed: 2026-07-03.
  35. [35]Meta Platforms, Inc. 2026. React Calls, Components, and Hooks. https://react.dev/reference/rules/react-calls-components-and-hooks. Accessed: 2026-06-28.
  36. [36]Meta Platforms, Inc. 2026. Rules of React. https://react.dev/reference/rules. Accessed: 2026-06-22.
  37. [37]Meta Platforms, Inc. 2026. State: A Component’s Memory. https://react.dev/learn/state-a-components-memory. Accessed: 2026-06-23.
  38. [38]Meta Platforms, Inc. 2026. Writing Markup with JSX. https://react.dev/learn/writing-markup-with-jsx. Accessed: 2026-06-22.
  39. [39]Leo A. Meyerovich, Arjun Guha, Jacob P. Baskin, Gregory H. Cooper, Michael Greenberg, Aleks Bromfield, and Shriram Krishnamurthi. 2009. Flapjax: a programming language for Ajax applications. In Proceedings of the 24th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2009, October 25-29, 2009, Orlando, Florida, USA, Shail Arora and Gary T. Leavens (Eds.). ACM, 1–20. doi:10.1145/1640089.1640091DOI
  40. [40]Robin Milner, Robert Harper, David MacQueen, and Mads Tofte. 1997. The Definition of Standard ML. The MIT Press. doi:10.7551/mitpress/2319.001.0001DOI
  41. [41]Yasuhiko Minamide, J. Gregory Morrisett, and Robert Harper. 1996. Typed Closure Conversion. In Conference Record of POPL ’96: The 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Papers Presented at the Symposium, St. Petersburg Beach, Florida, USA, January 21-24, 1996, Hans-Juergen Boehm and Guy L. Steele Jr. (Eds.). ACM Press, 271–283. doi:10.1145/237721.237791DOI
  42. [42]Peter W. O’Hearn and John C. Reynolds. 2000. From Algo to polymorphic linear lambda-calculus. J. ACM 47, 1 (2000), 167–223. doi:10.1145/331605.331611
  43. [43]Dominic A. Orchard and Tomas Petricek. 2014. Embedding effect systems in Haskell. In Proceedings of the 2014 ACM SIGPLAN symposium on Haskell, Gothenburg, Sweden, September 4-5, 2014, Wouter Swierstra (Ed.). ACM, 13–24. doi:10.1145/2633357.2633368DOI
  44. [44]Marco Patrignani, Eric Mark Martin, and Dominique Devriese. 2021. On the semantic expressiveness of recursive types. Proc. ACM Program. Lang. 5, POPL (2021), 1–29. doi:10.1145/3434302DOI
  45. [45]Gordon D. Plotkin. 1975. Call-by-Name, Call-by-Value and the lambda-Calculus. Theor. Comput. Sci. 1, 2 (1975), 125–159. doi:10.1016/0304-3975(75)90017-1DOI
  46. [46]François Pottier. 2011. A typed store-passing translation for general references. In Proceedings of the 38th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2011, Austin, TX, USA, January 26-28, 2011, Thomas Ball and Mooly Sagiv (Eds.). ACM, 147–158. doi:10.1145/1926385.1926403
  47. [47]Amr Sabry and Matthias Felleisen. 1992. Reasoning About Programs in Continuation-Passing Style. In Proceedings of the Conference on Lisp and Functional Programming, LFP 1992, San Francisco, California, USA, 22–24 June 1992, Jon L. White (Ed.). ACM, 288–298. doi:10.1145/141471.141563DOI
  48. [48]Stack Exchange Inc. 2025. Developer Survey: Technology. https://survey.stackoverflow.com/2025/technology. Accessed: 2026-06-24.
  49. [49]Stack Exchange Inc. 2025. State of JavaScript: Libraries. https://2025.stateofjs.com/en-US/libraries/. Accessed: 2026-06-24.
  50. [50]Don Syme, Adam Granicz, and Antonio Cisternino. 2016. Expert F# 4.0. Apress. https://www.microsoft.com/en-us/research/publication/expert-f-4-0/
  51. [51]Wenhao Tang and Sam Lindley. 2026. Rows and Capabilities as Modal Effects. Proc. ACM Program. Lang. 10, POPL (2026), 923–950. doi:10.1145/3776674DOI
  52. [52]Philip Wadler, Wen Kokke, and Jeremy G. Siek. 2022. Programming Language Foundations in Agda. https://plfa.inf.ed.ac.uk/22.08/
  53. [53]Andrew K. Wright and Matthias Felleisen. 1994. A Syntactic Approach to Type Soundness. Inf. Comput. 115, 1 (1994), 38–94. doi:10.1006/INCO.1994.1093DOI

Paper details

vlnc:W_wnwpy3fw
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY-SA 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents