Ewon TechForum
Providing technical solutions to technical requests

Talk2M and Single-page application
ktmachinex Offline
Junior Member

I'm currently trying to create a web page using the react framework and TypeScript. I was wondering if the Talk2M server supports SPA (Single-page application).

I'm trying to use a router which refresh a portion of my web page according to the link clicked.

It works perfectly fine when I access locally to my web page which is located on the ewon flexy 205 (ftp://[ewon ip address]/usr/dashboard/index.html).

The problem is that as soon as I use talk2m to connect to my ewon, the about and users links don't work anymore. See attachments to compare.

I've try using a BrowerRouter and an HashRouter but to no avail.

I've also tried to compare with what viewOn is doing, but there is no such thing an a link component in viewOn.

Here's the code I'm working with (taken from https://reacttraining.com/react-router/w...uick-start):

import React from "react";
import { BrowserRouter as Router, Switch, Route, Link } from "react-router-dom";

function Home() {
  return <h2>Home</h2>;

function About() {
  return <h2>About</h2>;

function Users() {
  return <h2>Users</h2>;

export default function App() {
  return (
              <Link to="/">Home</Link>
              <Link to="/about">About</Link>
              <Link to="/users">Users</Link>

        {/* A <Switch> looks through its children <Route>s and
            renders the first one that matches the current URL. */}
          <Route path="/about">
            <About />
          <Route path="/users">
            <Users />
          <Route path="/">
            <Home />

Any help would be greatly appreciated.


Attached Files
.jpg   custom web page locally.jpg (Size: 60,15 KB / Downloads: 11)
.jpg   custom web page with Talk2M.jpg (Size: 73,3 KB / Downloads: 9)

Possibly Related Threads…
Photo Viewon Page Forbidden Started by Jon
0 Replies - 26 Views
03-04-2020, 09:48 PM
Last Post: Jon
21-01-2020, 04:35 PM
Last Post: LewisH304
24-09-2019, 04:39 PM
Last Post: simon
12-06-2019, 02:08 PM
Last Post: valentin.joigneau
30-04-2019, 02:19 PM
Last Post: simon
12-03-2018, 10:45 PM
Last Post: simon
19-01-2018, 09:03 AM
Last Post: MadhuriSalunkhe

Users browsing this thread:
1 Guest(s)

Theme © Ewon 2019 - Forum software by © MyBB - Cookie policy