« first day (3078 days earlier)      last day (1874 days later) » 

2:41 PM
there's always portals, you'd have to look that up in the react docs
as for it not being a standalone script, can you not just import it and use it that way inside your bundle?
much like you can include or require in PHP?
and why not fetch?
fetch( first request ).then( result => {
    do something with it
    return fetch( second request)
}).then( result => {
    do something
    return fetch( third request )
}).then( result => {
    do something then update the data store and re-render
});
jQuery ajax requests return promises too
 
 
3 hours later…
5:15 PM
or if you must, store it in a components state
fetch( request...... )
	.then( res => res.json() )
	.then( data => {
		this.setState( { .... });
	});
if you're using redux, there's middlewares that let you pass in promises and async functions
 
5:49 PM
@TomJNowell Thanks for the info
Where do I store the script to import it? in the ./src ?
 
 
1 hour later…
6:58 PM
@MichaelEcklund if that's where you put your JS files
Webpack/babel aren't just a React tool
you can use them with jQuery, or vanilla JS and never write any JSX at all
and you don't need a React.Render, you can just create it with jQuery and avoid React altogether if you want
just remember to export the things you want, then import them in other files
 

« first day (3078 days earlier)      last day (1874 days later) »