Questions tagged [react]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
21 views

How to pass JS Remoting Apex response to a React component hosted in VF without setting it to window?

I am creating a simple react application where I want to view and add add data to SF (in this case "Posts". I have successfully injected my react application into a Visual Force page. Now I ...
0 votes
0 answers
42 views

View Salesforce Files without downloading in NodeJS/ReactJS

I want to use salesforce files Library as a content source to store mp4, pdf, txt and docs files and render them on a ReactJS app. I am using Salesforce REST APIs for most of the operations including ...
0 votes
0 answers
73 views

Mobile app with Lwc and React Google Map having CORS issue

For our mobile app requirement, we planned to use the React on the UI side for more styles with google map interface. https://www.npmjs.com/package/google-map-react The mobile app is not with the ...
0 votes
0 answers
26 views

Lines are not displayed on APEX_Line_chart

//Here is the code let monthYearArray=[]; actualData.length > 0 && actualData.map(x=>x.values.forEach((element)=>{ monthYearArray.push(element.Date....
0 votes
0 answers
44 views

Salesforce PartnerConnection(Partner Api) object not passable as response

I am able to successfully connect to Salesforce using Soap API login method from Stub files Partner WSDL in Java. As per Soap Api documentation, PartnerConnection object should be used to retrieve any ...
  • 1,311
1 vote
1 answer
185 views

How to pass JS Remoting Apex response to a React component hosted in VF?

I'm working in a simple POC to learn how to connect React-Visualforce-Apex. I have success inserting data generated in a React form to Salesforce, but now I would like to retrieve Salesforce data on ...
0 votes
0 answers
180 views

Initiate different chat buttons on a single page application (React)

Our website is a single-page application build on React and we would like to have different buttons based on different state: If the user is not logged in (button A) If the user is logged in (button ...
  • 373
0 votes
0 answers
141 views

How do I use design system react modal with lightning web security?

I have a simple lightning web component that contains a simple react app built with components from design-system-react. The react app consists of a button that opens a modal window. Given that ...
  • 171
0 votes
0 answers
155 views

Deploy a chatbot on React.js

I'm working in a company that wants to implement their chatbot on their custom web app, so they assigned this task to my. I'm not very experienced in Salesforce so maybe I'm missing something, but I ...
2 votes
1 answer
171 views

Are there any memoization mechanisms in LWC?

I am just curious if there are any memoization mechanisms in Lightning Web Components similar to useMemo in React. What I want to achieve: I want to be sure that that all costly calculations are made ...
  • 380
0 votes
0 answers
79 views

How can I make navigator.geolocation.getCurrentPosition work on deployed app

I am building a Next-js app that should work only within a specific geo-radius. I am using navigator.geolocation.getCurrentPosition to get the current location of the user. When I test the app locally,...
  • 101
0 votes
1 answer
56 views

Is it a liability to use the lightning container npm package? (not been updated for 4 years...)

I have embedded my react app in a lightning container iframe as the docs suggest. <aura:component access="global" implements="flexipage:availableForAllPageTypes"> <...
  • 1
0 votes
1 answer
182 views

Calling Apex Methods in React? (Not using LCC - because it seems outdated)

Hello – in referencing https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.apex_wire_method Is there a way to reference apex functions directly in a React component. I ...
  • 1
2 votes
1 answer
851 views

Why is Heroku stuck on installing node modules on initial build?

Question: Why is Heroku stuck on installing node modules on the initial build? Summary: I have tested this with both Heroku and Netlifty. Both encounter the same issue. I am able to run npm run build ...
0 votes
1 answer
250 views

Can't get data- attributes from SLDS React button click

According to the documentation on the React SLDS Button: Although not listed in the prop table, all aria-*, data-* and form* props will be added to the button element if passed in. So my button: <...
  • 2,539
0 votes
2 answers
2k views

Log in to salesforce from a react app

I need to request an authorization code so my application can make a simple request to salesforce. Hitting the url in the article redirects me to the right page where I can grab the code, but I first ...
2 votes
2 answers
265 views

How to authenticate requests to the user interface api?

I am trying to make a GET request to the UI API from within a react project using a simple lifecycle method: componentDidMount() { fetch('https://{my_salesforce_instance}.salesforce.com/services/...
  • 23
2 votes
1 answer
181 views

How to integrate the user interface api with an existing project?

I am trying to implement a form in my react app that allows users to submit data to salesforce using the UI API. From following the documentation I have created a connected app with a callback url and ...
4 votes
1 answer
875 views

How can I implement Lightning Web Components into my React application?

I have created a simple LWC that displays a form and sends user data to Salesforce: userForm.js import { LightningElement } from 'lwc'; export default class UserForm extends LightningElement { ...
0 votes
1 answer
361 views

Can we use JSX in our LWC component with react application?

I want to build a chatting application in React and I want to use that functionality into my one of the component.
0 votes
0 answers
109 views

Some iPadOS catch error " 'Unexpected token '<''. Logged in? " on Native Salesforce app

Sometimes my customer's iPad; iPadOS 14.5 catches 'Unexpected token '<''. Logged in? even if it's operating without problems a few minutes ago. The message confuses me and I want to know where is ...
  • 15
2 votes
0 answers
272 views

Error building app Cordova marketing Cloud sdk

I have an app using React Js and Cordova, I need to integrate it with [Marketing Cloud SDK], I followed the instruction that the plugin mentions, but it throws me an error when compiling The error it ...
  • 21
0 votes
1 answer
1k views

Best approach to use/port/migrate an open-source React component to LWC

I want to use an existing React Component as a LWC Lightning Web Component in a Salesforce app. It's a complex component with a Github repo full of Subcomponents. Everything is written in Typescript. ...
1 vote
1 answer
167 views

Is it possible to use SVG files within SLDS React Datepicker components?

I am working in the Quip platform (which runs on React), using the SLDS-React Datepicker component within a SLDS-React DataTableCell but have been unable to render any of the SLDS icons (.SVG files) ...
2 votes
0 answers
278 views

Adding multiple apex-controllers on a manifest.json file of a react app

I have a react app that is built and added as a static resource to a lighting component. This react app uses calls to apex (LCC.callApex) to get certain necessary data. For the app to be able to ...
0 votes
1 answer
81 views

query products from pricebook to React

I recently had a question on how to query a list of products from a pricebook and was told that i could use the below to do so [SELECT Id, Product2Id, Product2.Name FROM PricebookEntry WHERE ...
  • 3
2 votes
0 answers
170 views

How do you do Canvas Authentication client-side for a Javascript application?

I am trying to build out a PoC of what will eventually be a nodeJS+React application that will be embedded in Salesforce via Canvas. I'd like to get the PoC up and running with just React. What would ...
0 votes
1 answer
628 views

using Angular JS /REACT in LWC

As we all know that LWC is built on Web Standard (jUst like REACT JS,Angular Js ), so is it necessary to use these front end technologies in our Salesforce Application. As an architect ,do we need to ...
1 vote
0 answers
1k views

Integrating liveagent chat into a react/webapp

I'm trying to implement a liveagent chat instance that's triggered from within a (React) web app. I've got the deployment script in my HTML 'https://c.la1-c1-fra.salesforceliveagent.com/content/g/js/...
1 vote
0 answers
456 views

Problems with setting up MobilePush to App build with React

We are trying to implement mobile push with application build on React Native. App is installed, SDK is ready, for Android and iOS. First, contacts were injected anonymously with SFMC generated ...
1 vote
1 answer
104 views

React SDK Contact Registration

Using the React SDK for MC Push is there a way to Delay Registration using the iOS SDK? There is a method to update Contact Key, but it's unclear how this works. If the Contact is registered already (...
0 votes
0 answers
187 views

How to call Intent Api from postman or JavaScript

curl -X POST -H "Authorization: Bearer <TOKEN>" -H "Cache-Control: no- cache" -H "Content-Type: multipart/form-data" -F "data=@C:\Data\weather.csv" -F "type=text-intent" https://...
  • 23
0 votes
1 answer
20 views

ID Property passed to child changes value

I'm quite new to lwc's and i'm having an issue where the property passed down to a child component, specifically an ID, the id value in the child component has (-71) appended to the end of the ID. ...
0 votes
2 answers
303 views

Can we use LWC components in React Application?

Is it possible to use LWC components in React application? We are trying to get some help on this but we don't see any supporting articles so far.
  • 1
1 vote
1 answer
2k views

Uncaught (in promise) TypeError: c.createElement is not a function

I am getting the below error when using react js in LWC. Any idea how to resolve this. Uncaught (in promise) TypeError: c.createElement is not a function LWC import { LightningElement } from ...
2 votes
1 answer
532 views

react.createElement is not a function LWC

I am getting the below error when using react js in LWC. Any idea how to resolve this. afterRender threw an error in 'c:razorpay' [c.createElement is not a function] JS import { ...
2 votes
0 answers
407 views

react-dom js file not loading properly in LWC

I am trying to import react and react-dom js file from static resource. i have usded the below cdn to collect the js file into static resource https://cdnjs.cloudflare.com/ajax/libs/react/16.9.0/cjs/...
1 vote
1 answer
1k views

CSP Issue when trying to bring in a React app to a lightning container

I have a simple aura component with a lightning container: <aura:component access="global" implements="flexipage:availableForAllPageTypes"> <lightning:container aura:id="ReactApp" src="{...
  • 2,539
1 vote
1 answer
192 views

Translations for multiple locales/dialects

We're developing a managed package that uses the translation workbench to provide translations. We'd like to support multiple English translations so that users with a different locale from En-US can ...
  • 11
0 votes
1 answer
377 views

React Native SDK - SmartSync - REST API calls

We're currently retrieving a list of Salesforce apps from the UI API using this function: net.sendRequest('/services/data', `${net.getApiVersion()}/ui-api/apps`, (e) => { setApps(...
14 votes
3 answers
10k views

Modern JavaScript Frameworks (Angular Js, React JS ) within LWC

As documented on the below link, https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.get_started_supported_javascript Lightning Web Components Javascript support includes :...
13 votes
2 answers
7k views

Use of Javascript Frameworks in Lightning Web Component

Is there any documentation available for recommended JavaScript Frameworks (Angular JS, React JS, etc.), which can work well with Lightning Web Component? Most of the places, I found that it supports ...
  • 2,342
0 votes
1 answer
113 views

Building Angular and React components

I have been through tons of documents, searching the web I came across some resources but it hasn't really helped me. I want to know how to ship an Angular and a React application (step by step) to ...
  • 1,357
0 votes
1 answer
140 views

React.js GraphQL web app returning random null values

I'm working on a React.js web app that leverages GraphQL for accessing a combination of varying endpoints, including our org's SF data. My only issue is isolated to my Salesforce progress. In general, ...
1 vote
0 answers
73 views

Building managed package using JS frameworks/library

I'm trying to do an analysis of an existing managed package that we have built currently we have a bunch of VF pages and Lightning Components. At end of this analysis, we want to determine which JS ...
  • 1,357
8 votes
1 answer
1k views

Can LWC be used with other JS frameworks like ReactJS on VF Pages?

Currently the applications are built in ReactJS on top of VF Page. As part of enhancement, new components need to be built. Also they need to communicate with each other. I am planning to have LWC ...
  • 2,293
0 votes
1 answer
80 views

Locker Service and CSS in JS

Without trying this myself I was curious if anyone else was able to get CSS in JS to work within the confines of LockerService. At first glance it looks like styled-components might actually work as ...
  • 387
20 votes
4 answers
6k views

Lightning Framework vs Standard Client Side Frameworks (i.e. React) // Which to chose when, and why?

Disclaimer Keep it objective! This one can get a little opinionated, please try to keep your answer specific to the facts a developer should be considering when choosing between two viable options ...
1 vote
1 answer
1k views

Plugging React JS app into lightning community

I have created a react.js application where I have used SLDS for my styling and I have also installed Lightning container module to make direct API calls to APEX code in my org. I want to plug the ...
3 votes
1 answer
1k views

How should I import Design System React css?

I tried using Lightning Design System React doing what's under the Getting Started section. I've installed the npm modules as explained: npm install @salesforce-ux/design-system @salesforce/design-...