Skip To Content
Back to Blog

How-to Use ReactJS and Redux in Salesforce

By Bryan Anderson 12.09.15

Silverline has seen an influx of projects where clients require a strong custom mobile presence. This has led us to start looking at new web technologies and programming languages to achieve this. One language that has stood out to our team is ReactJS.

ReactJS is a language developed by Facebook that helps with creating and maintaining HTML views in JavaScript (The “V” in MVC as they describe it). This allows a more modular design while designing a web application to run in Salesforce. It also allows the code to be more portable since it does not rely on any Salesforce specific tags, only pure HTML and JavaScript.

source code in react

An example of source code written in React.

 

JSX code to render HTML

JSX code to render HTML

Along with ReactJS, we needed a new way to maintain the state/data of our web application. This is where Redux comes into play. Redux is a predictable state container for JavaScript apps.

To help you out, we’ve put together a GitHub repository to show how all these new technologies work in Salesforce. It includes a simple app that manages a list of Account Names.

How the app renders for both React and the "old" way.

How the app renders for both the React and the “old” way.

For more tips from the Silverline team, subscribe to our blog.

Ready to see real results? We can help.

Get in Touch

We don't support Internet Explorer

Please use Chrome, Safari, Firefox, or Edge to view this site.