Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

## Input

```javascript
// @panicThreshold(none)
'use no memo';

function Foo() {
return <button onClick={() => alert('hello!')}>Click me!</button>;
}

```

## Code

```javascript
// @panicThreshold(none)
"use no memo";

function Foo() {
return <button onClick={() => alert("hello!")}>Click me!</button>;
}
function _temp() {
return alert("hello!");
}

```

### Eval output
(kind: exception) Fixture not implemented
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// @panicThreshold(none)
'use no memo';

function Foo() {
return <button onClick={() => alert('hello!')}>Click me!</button>;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

## Input

```javascript
// @noEmit

function Foo() {
'use memo';
return <button onClick={() => alert('hello!')}>Click me!</button>;
}

export const FIXTURE_ENTRYPOINT = {
fn: Foo,
params: [],
};

```

## Code

```javascript
import { c as _c } from "react/compiler-runtime"; // @noEmit

function Foo() {
"use memo";
const $ = _c(1);
let t0;
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
t0 = <button onClick={_temp}>Click me!</button>;
$[0] = t0;
} else {
t0 = $[0];
}
return t0;
}
function _temp() {
return alert("hello!");
}

export const FIXTURE_ENTRYPOINT = {
fn: Foo,
params: [],
};

```

### Eval output
(kind: ok) <button>Click me!</button>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// @noEmit

function Foo() {
'use memo';
return <button onClick={() => alert('hello!')}>Click me!</button>;
}

export const FIXTURE_ENTRYPOINT = {
fn: Foo,
params: [],
};
Loading