GithubHelp home page GithubHelp logo

dbwcooper / react-ctrl-f Goto Github PK

View Code? Open in Web Editor NEW
12.0 12.0 4.0 3.49 MB

Using react to realize web Ctrl + F function

Home Page: https://react-ctrl-f.vercel.app

HTML 2.29% TypeScript 95.42% CSS 2.29%

react-ctrl-f's Introduction

Hi

react-ctrl-f's People

Contributors

dbwcooper avatar henryjsneed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

react-ctrl-f's Issues

bug - Invalid hook call

Using MatchText raises invalid hook call error.

Code

import React, { useContext } from "react";
import { Link } from "react-router-dom";

import {
  MatchText,
  SearchProvider,
  SearchContext,
  SearchEventContext,
} from "react-ctrl-f";

export default function Home() {
  return (
    <>
      <div>Home</div>
      <MatchText id='match-text-id-1'>Hello world</MatchText>
    </>
  );
}

As soon as i remove MatchText. Everything works fine. Am i missing something?

Versions using:
"react-ctrl-f": "^0.0.4"
"react": "^18.1.0"

Invalid hook call

Hi, it's a great project ! Congratulations ! But... When I try it on my app (it's absolutely the same code as your src/pages folder) it's working but I have the following error : "invalid hook call" which is very strange because there is nowhere an invalid hook call in your code. Of course, it's impossible to push in production (I use Vercel as well).
Maybe some have an idea about how to fix it ?
Thanks in advance for the reply !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.