If Requirejs is used in the front end of my PHP project,
So what if some of the PHP code would return some JavaScript code snippets to run, where would you put the returned code?
Always feel scattered to be very messy and difficult to maintain?
Or is that what I do with PHP's return JavaScript code?
My understanding of Requirejs is that a page only need to introduce a JS, by this JS to deal with all the things, do not know so understanding right, seeking guidance.
I Meng new 2333 have not seen any of the things to ask for advice ~
Reply content:
If Requirejs is used in the front end of my PHP project,
So what if some of the PHP code would return some JavaScript code snippets to run, where would you put the returned code?
Always feel scattered to be very messy and difficult to maintain?
Or is that what I do with PHP's return JavaScript code?
My understanding of Requirejs is that a page only need to introduce a JS, by this JS to deal with all the things, do not know so understanding right, seeking guidance.
I Meng new 2333 have not seen any of the things to ask for advice ~
Requirejs is an implementation of the AMD modular specification, as far as my development experience is concerned, the current requirejs is used relatively little and is generally based on the development of NPM ecology, i.e. the COMMONJS specification, or a modular approach based on the ES6 module specification, And the author said that the return JS code fragment is not encountered.