actions.js — react Source File
Architecture documentation for actions.js, a javascript file in the react codebase. 2 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 6b95c06f_215b_1e97_d47c_b54ecfe66630["actions.js"] 3e0d412c_f90b_2377_85dc_6cf00321729c["ServerState.js"] 6b95c06f_215b_1e97_d47c_b54ecfe66630 --> 3e0d412c_f90b_2377_85dc_6cf00321729c 36295412_a7f7_feaa_b721_6695e0d1be8b["setServerState"] 6b95c06f_215b_1e97_d47c_b54ecfe66630 --> 36295412_a7f7_feaa_b721_6695e0d1be8b eef5c2d6_5cd1_257d_9f3d_8561e1cce25f["App.js"] eef5c2d6_5cd1_257d_9f3d_8561e1cce25f --> 6b95c06f_215b_1e97_d47c_b54ecfe66630 style 6b95c06f_215b_1e97_d47c_b54ecfe66630 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
'use server';
import {setServerState} from './ServerState.js';
export async function like() {
setServerState('Liked!');
return new Promise((resolve, reject) => resolve('Liked'));
}
export async function greet(formData) {
const name = formData.get('name') || 'you';
setServerState('Hi ' + name);
const file = formData.get('file');
if (file) {
return `Ok, ${name}, here is ${file.name}:
${(await file.text()).toUpperCase()}
`;
}
return 'Hi ' + name + '!';
}
Domain
Subdomains
Dependencies
Imported By
Source
Frequently Asked Questions
What does actions.js do?
actions.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Entrypoint subdomain.
What functions are defined in actions.js?
actions.js defines 2 function(s): greet, like.
What does actions.js depend on?
actions.js imports 2 module(s): ServerState.js, setServerState.
What files import actions.js?
actions.js is imported by 1 file(s): App.js.
Where is actions.js in the architecture?
actions.js is located at fixtures/flight-esm/src/actions.js (domain: BabelCompiler, subdomain: Entrypoint, directory: fixtures/flight-esm/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free