Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: add support for React-Router with `<Link /> #657

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

andycall
Copy link
Member

@andycall andycall commented Sep 1, 2024

Add the following essential missing DOM features to make WebF work with React Router's element:

Added DOM Features:

  1. Event.preventDefault() for the element.
  2. Event.button property.

Demo React.js code:

import './App.css';
import React from 'react';

import { Link } from "react-router-dom";

export default function App() {
    return (
        <div>
            <h1>Bookkeeper</h1>
            <nav
                style={{
                    borderBottom: "solid 1px",
                    paddingBottom: "1rem",
                }}
            >
                <Link to="/about">About</Link> |{" "}
                <Link to="/detail">Detail</Link>
            </nav>
        </div>
    );
}

@andycall andycall force-pushed the feat/prevent_default branch 2 times, most recently from 2255309 to 5b97087 Compare October 10, 2024 03:02
@andycall andycall force-pushed the feat/prevent_default branch from 5b97087 to 45796d5 Compare November 12, 2024 02:36
@andycall andycall force-pushed the feat/prevent_default branch from 45796d5 to 62f47e6 Compare November 19, 2024 07:07
@andycall andycall force-pushed the feat/prevent_default branch from 62f47e6 to 9d41a9a Compare November 23, 2024 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant