Next.js: Difference between revisions

No edit summary
 
Line 12: Line 12:
Individual components may have dynamic properties loaded automatically using <code>getInitialProps</code>.  
Individual components may have dynamic properties loaded automatically using <code>getInitialProps</code>.  
However, this needs to be able to run on the server or the client, best done by sending a request to an external API.<br>
However, this needs to be able to run on the server or the client, best done by sending a request to an external API.<br>
Alternatively, you can directly import json data in your code using webpack to embed static data into your program.
Alternatively, you can directly [https://webpack.js.org/guides/asset-modules/ import json or assets] in your code using webpack to embed static data into your program.


===Environment variables===
===Environment variables===