React Code Style and Architecture
Future Articles
The following are items that we would like to have documented in the future. Most have not been d...
Official React Documentation
https://beta.reactjs.org/learn beta.reactjs.org has much more modern docs. Most all of the exa...
File and Folder Structure
File and Folder Structure should match the UI as closely as possible. There are cases where hook...
Code Ordering Style
Import Ordering: React Packages EFC packages Internal references CSS Expanding of...
Custom Hooks Style Guide
When writing custom hooks follow guidelines as described in Code Ordering Style. On top of code...
Conditional Rendering
React has a tutorial on different ways to conditionally render JSX and can be found here. Condit...
App Wide State
We implement app wide state by using Context. Context reactjs.org has a tutorial for Context a...
Events and Listeners
Events are typically handled using React's useEffect hook. useEffect React has a tutorial as we...
Loading Inidicator
We found a cool react component from react-loading-skeleton called Skeleton. In its props, it le...
Localization
useSafeTranslation hook Pass in the "filename / namespace" as the parameter ...
Routing
There is a specific url route for every page and tab within a page in Atlantis. Each has a specif...
Permission and Feature Validation
useRouteValidator Hook Any logic related to validating if a user can view a specific route (for ...
Virtualization and Infinite Scrolling
Virtuoso Library We use a library called Virtuoso to do both virtualization and infinite scrolli...
Modals
There is currently a hook called useModal that we use to open modals in many places. This hook ha...