« first day (3077 days earlier)      last day (37 days later) » 

6:49 AM
0
Q: Can questions be asked in another language alongside English?

jsmodI couldn't find anything in the help center here about this and I was wondering if it was against the rules or not for people to post questions in a foreign language? What about if they posted in English and another language (bilingual questions)? Update: I did find this https://stackoverflow.bl...

 
 
12 hours later…
6:33 PM
@TomJNowell How can I bring in a script which was built with jQuery into my React Application?
This script communicates with a 3rd party service, sending requests and waiting for responses.
Once all requests have a valid response, it manipulates the DOM.
Can I have the whole script just do it's thing, then export a single object to update the state of another component?
or let my component import that object?
I guess the problem is, it's asynchronous.
Either way, I would like that script to be a part of my React application, and not a "standalone script".
 
@MichaelEcklund does it have to do all the DOM stuff itself?
Could it just pass it to React or a common data store then let React handle the visuals?
it's difficult to say without knowing more about your React application
but if you're using React it's probably better to use fetch and a polyfill
and stick to promise based setups
look up the new React suspense stuff too
 
7:01 PM
let me back up a sec
I added a reference name to my React component. I converted that standalone script to stop modifying the DOM. It collects the data, and once it's got all the data it needs, then it calls that reference name to update the state of my component from OUTSIDE of React.
I would like this script to function within the React environment instead of being a separate script
I just can't seem to get it to work with React properly.
This script makes 3 different calls to the 3rd party service, after the 3rd call, it has the data it needs. Then it tells the component to update it's state.
which then React updates the DOM appropriately
but I would like to bundle this standalone script with my react application
I don't want it to be a dependency script for my application
 

« first day (3077 days earlier)      last day (37 days later) »