diff --git a/Documentation/assets/render-react-php-file-processed.png b/Documentation/assets/render-react-php-file-processed.png
index 3b0c1eb..fe7158d 100644
Binary files a/Documentation/assets/render-react-php-file-processed.png and b/Documentation/assets/render-react-php-file-processed.png differ
diff --git a/Documentation/how-to-dev.md b/Documentation/how-to-dev.md
index 5f8b59a..68599a2 100644
--- a/Documentation/how-to-dev.md
+++ b/Documentation/how-to-dev.md
@@ -62,20 +62,19 @@ As our views are now done using react (and defined under the `front/views` folde
If you look at the `send_react_front($viewURI, $viewArguments)` function, you'll see that is simply loads the file `src/react-display-file.php` with given arguments.
The file is a simple html5 template with a `
```
@@ -84,11 +83,8 @@ here's how it renders if you do a request to `http://localhost:8080/`.

The index.php's router says that for a `GET` on the `/` url, we call the `SampleFormController#displayForm` method.
This method then uses the `send_react_front`, to render the `views/SampleForm.tsx` react element, with no arguments (an empty array).
-You can see that the react view is rendered using a `render` function.
-This function **must figure in the view's file, and be exported**.
-We'll talk about an important coding convention with react views that this script block requires later.
+The view file **must export by default its react function component**.
-But now let's talk about our server profiles !
## Server Profiles
If you go on the staging server, you'll see that, for the exact same request equivalent, the generated `src/render-display-file` file changes :

@@ -107,11 +103,15 @@ the file is replaced with `prod-config-file.php` by the CI when deploying to the
The two profiles declares an `_asset(string $uri)` function, used by the `/config.php::asset` method, but with different implementations :
### Development profile
```php
-const FRONT_URL_CONSTANT = "http://localhost:5173";
+$hostname = getHostName();
+$front_url = "http://$hostname:5173";
function _asset(string $assetURI): string {
- return FRONT_URL_CONSTANT . "/" . $assetURI;
+ global $front_url;
+ return $front_url . "/" . $assetURI;
}
+
+
```
The simplest profile, simply redirect all assets to the development server
@@ -148,60 +148,3 @@ __any react view file__ should __export__ a function with signature `render(argu
The `arguments` parameter is used to pass data to the react component.
If you take a look at the `front/views/SampleForm.tsx` view, here's the definition of its render function :
-
-```ts
-/// Here's the definition of the view
-function SampleForm() {
- ... react jsx code here
-}
-
-// the `SampleForm` does not inputs arguments but the parameter IS STILL REQUIRED
-export function render(args: any) {
- const root = ReactDOM.createRoot(
- document.getElementById('root') as HTMLElement
- );
- root.render(
-
username: {username}
//arguments are used heres -password: {password}
-username: {username}
@@ -10,15 +10,3 @@ function DisplayResults({password, username}: any) {