🚀 DAY 3 OF LAUNCH WEEK: Introducing Webhook Events for Pull Request Scans.Learn more →
Socket
Book a DemoInstallSign in
Socket

@catamphetamine/found

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@catamphetamine/found

Extensible route-based routing for React applications

latest
Source
npmnpm
Version
2.0.1
Version published
Maintainers
1
Created
Source

Found

Extensible route-based routing for React applications.


This is a fork of the original found package with some changes:

  • Replaced redux with a basic stubs of it. The rationale is that the redux that was used under the hood by this package would conflict with the redux used by the application itself.
  • farce dependency was replaced with navigation-stack which is a fork of farce with some changes.
  • Added a workaround for a bug when found router ignores any navigation actions that have been dispatched before its componentDidMount() has been called. Now it exports a client-side-only onRouterReady() function that could be used to execute code only after the router is ready to process navigation actions.
  • Merged in found-scroll code and rewrote it in React hooks to fix a [bug](https://github.com/4Catalyzer/found-scroll/issues/382) in React strict mode.
  • Removed activeClassName

How found works in a nutshell:

  • It listens to navigation-stack's (or farce's) UPDATE Redux action to get notified on the current location change.
  • When the current location has changed, it matches the location against the routes configuration and finds a matching route. The matching route info is passed to the <Router/> React element as a match property.
  • After that, found starts "resolving" the matched route, e.g. it will call getData function of each route segment and wait for those to finish. See async resolveMatch() method of <BaseRouter/> component in createBaseRouter.tsx file, which calls the code from resolver.ts file.
  • After the matched route has been "resolved", a resolvedMatch property is passed to the <Router/> React element (similar to match property).
  • The application (and the <Link/> React component) has access to RouterContext (via useRouter() hook) that provides match and router properties where match has the info on the matched route and router has a few utility functions such as addBasePath() (see createStoreRouterObject.ts file for the list of router properties).
The source code is available at github.com or gitlab.com.

Travis npm

Found is a router for React applications with a focus on power and extensibility. Found uses static route configurations. This enables efficient code splitting and data fetching with nested routes. Found also offers extensive control over indicating those loading states, even for routes with code bundles that have not yet been downloaded.

Found is designed to be extremely customizable. Most pieces of Found such as the path matching algorithm and the route element resolution can be fully replaced. This allows extensions such as Found Relay to provide first-class support for different use cases.

Found uses Redux for state management and Farce for controlling browser navigation. It can integrate with your existing store and connected components.

Keywords

react

FAQs

Package last updated on 07 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts