Skip to content

Commit 18dc9a9

Browse files
committed
Clarification regarding creating instance
1 parent d873efd commit 18dc9a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/ff-concepts/adding-customization/code-file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ When you create an instance of a class, you can:
148148
- Access and update the fields (e.g., `review1.rating` or `review1.comment`).
149149
- Call methods that do something with that data (e.g., `review1.markHelpful()` or `review1.shortComment()`).
150150

151-
To create an instance of a custom class, open the **Set from Variable** dialog and select **Create Custom Class Instance**. Choose the class you want to use, then select the class name from the **Constructor** dropdown. After that, set values for each of the required fields.
151+
To create an instance of a custom class, first you need to [create a state variable](../../ff-concepts/state-management/state-variables.md#creating-state-variables) (of type Custom Class) that will hold the instance. Then, to create and add the instance to the state variable, open the **Set from Variable** dialog and select **Create Custom Class Instance**. Choose the class you want to use, then select the class name from the **Constructor** dropdown. After that, set values for each of the required fields.
152152

153153

154154
<div style={{

0 commit comments

Comments
 (0)