Slack is transitioning its web client to React. When Slack was first built, our frontend consisted of established technologies like jQuery and Handlebars. Since then, the community has developed better ways to create scalable, data-driven interfaces. jQuery’s “render and modify” approach is straightforward, but it’s prone to falling out of sync with the underlying model.…
Overview
The article discusses the process of rebuilding Slack's Emoji Picker using React, highlighting the advantages of React's rendering model over traditional methods. It details the performance improvements achieved and the development workflow challenges faced during the transition.
What You'll Learn
How to implement a self-contained React component for an interactive UI feature
Why using React can improve performance and reliability in web applications
How to integrate React into an existing development workflow with minimal disruption
How to leverage virtual lists for optimizing rendering performance in React
Prerequisites & Requirements
- Basic understanding of React and its component lifecycle
- Familiarity with Storybook for UI development(optional)
Key Questions Answered
How does React improve the performance of the Emoji Picker?
What challenges did Slack face when integrating React into their existing workflow?
What are the key components of the new Emoji Picker built in React?
What performance metrics were observed after deploying the new Emoji Picker?
Key Statistics & Figures
Technologies & Tools
Some links below are affiliate links. We may earn a commission if you make a purchase.
Key Actionable Insights
1Consider using React for building interactive UI components to leverage its efficient rendering capabilities.React's virtual DOM can significantly improve performance by reducing the number of direct DOM updates, making it ideal for features like the Emoji Picker that require frequent updates.
2Utilize Storybook for developing and testing UI components in isolation.Storybook allows developers to visualize different states of components, facilitating easier testing and review processes, which can enhance collaboration among team members.
3Adopt a modular approach by exporting a single component per file to maintain code organization.This practice improves maintainability and clarity in the codebase, especially when working with complex components like the Emoji Picker.
4Implement a robust build pipeline with tools like webpack to streamline development processes.A modern build pipeline can help manage dependencies and reduce conflicts, making it easier to integrate new technologies like React into existing workflows.