fex-template

Request-Response Cycle

HTTP RequestClickEvent ListenerSocket ListenerExpressBrowser-ExpressServer MiddlewareClient MiddlewareUniversal Request HandlersUniversal React ComponentsRendered HTMLDiffed DOMHTTP ResponseDOM Update

An HTTP request by the client initiates the communication cycle, requesting server resources. Similarly, user interactions like clicking a link are captured on the client side, indicating an intent to navigate or request new content.

GET / HTTP/1.1
Host: example.com

const anchor = document.createElement('a');
anchor.href = '/';
const event = new MouseEvent('click', {
    'view': window,
    'bubbles': true,
    'cancelable': true
});
anchor.dispatchEvent(event);

Next: Single Page Application Demo