Atlassian’s Forge platform leverages hooks to manage state and lifecycle in app development, but its UI Kit 1 implementation diverges from React’s standard behavior. Understanding these differences is crucial for building efficient Forge apps.

  • Forge UI Kit 1 hooks run server-side with Atlassian-specific features
  • UI Kit 2 and Custom UI use standard React hooks with client-side execution
  • Proper useEffect patterns are critical to handle asynchronous side effects correctly

What happened

Atlassian’s blog post delves into the internal workings of hooks within its Forge platform, focusing on how these are implemented in UI Kit 1 compared to UI Kit 2 and Custom UI. The post explains that UI Kit 1 hooks, like useState and useEffect, work similarly to React’s but run on Atlassian’s serverless architecture rather than client-side. Additionally, UI Kit 1 provides unique hooks tailored specifically for Atlassian products, extending beyond the common React functionality.

The article also highlights the important differences in handling asynchronous operations and side effects between the UI Kit versions. It emphasizes how React’s useEffect handles side effects while maintaining component purity, and how similar approaches must be adjusted for Forge’s environment. These insights equip developers with understanding to correctly implement hooks within Forge apps, particularly when dealing with different UI Kits.

Why it matters

Correctly managing state and side effects is foundational in React development, and Forge’s variations introduce subtle but essential distinctions. Misunderstanding how Forge executes hooks, especially the server-side nature of UI Kit 1 hooks, can lead to unexpected behavior or inefficient app performance. Knowing the differences prevents developers from applying React patterns incorrectly within Forge’s context.

Furthermore, UI Kit 2 and Custom UI adopting standard React hooks means developers have more flexibility but may lose direct access to some Forge-specific utilities. This trade-off demands awareness to choose the right toolkit and implementation strategy for the app’s goals. Mastery of these differences ultimately leads to more robust, maintainable Forge applications.

What to watch next

Developers should monitor official Atlassian Forge updates for any evolving hook implementations, especially improvements to harmonize UI Kit versions or expand features. Community discussions and shared examples highlighting real-world scenarios where hook behaviors diverge are valuable for deepening practical understanding.

Additionally, exploring more detailed async handling patterns and side effect management in Forge apps can help avoid common mistakes. Future posts or guides on migrating between UI Kit versions or integrating Custom UI with Forge hooks might also emerge, providing further clarity for developers adapting to Forge’s environment.

Source assisted: This briefing began from a discovered source item from Atlassian Blog. Open the original source.
How SignalDesk reports: feeds and outside sources are used for discovery. Public briefings are edited to add context, buyer relevance and attribution before they are published. Read the standards

Related briefings