Skip to content

Commit

Permalink
buildTrials functions versus Trial objects
Browse files Browse the repository at this point in the history
  • Loading branch information
fordmcdonald committed May 3, 2024
1 parent be70af6 commit 706ffb9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/further_reading/jspsych_basics.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
id: jspsych
slug: /jspsych
title: JSPsych
description: "Understanding concepts in JSPsych"
---

## Assembling Trials: Functions vs. Objects

When working with Honeycomb to create experiments, users often have questions regarding the distinction between trials exported directly as Trial objects and those encapsulated within functions that output Trial objects.

In the `honeycombTrials.js` file, you'll find that some trials are exported as objects while others are enclosed within functions. During experiment execution, certain downstream trials may require access to data collected in previous trials.

Trials relying on the global `jsPsych` object to store timeline data or retrieve aggregated results from prior trials need to dynamically ingest this information during the experiment. Consequently, the `buildTrial` functions serve the purpose of assembling trials with data in the jsPsych object collected during the experiment.

For further information about the `jsPsych` global object, refer to the [jsPsych documentation](https://www.jspsych.org/7.3/reference/jspsych/).

0 comments on commit 706ffb9

Please sign in to comment.