Skip to content

Add warning about creating Cartridge Controller in React component #242

@kronosapiens

Description

@kronosapiens

The Cartridge Controller docs warn users not to create Controller instances inside of React components, as this would lead to the Controller being re-created on page load, leading to connection and performance issues:

⚠️ Important: The ControllerConnector instance must be created outside of any React components. Creating it inside a component will cause the connector to be recreated on every render, which can lead to connection issues.

We should update the Starknetkit docs to include a similar warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions