
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
react-epub-search
Advanced tools
An epub-reader for React integrated with search powered by ePubJS
An ePub-reader for react intergrated with search powered by EpubJS #react #epubjs #webpack #babel #standardjs
React Reader is a react-wrapper for epub.js.
epub.js is a great library and this is a wrapper for it intergated with search. This wrapper makes it easy to use in a React-app.
This package publish 4 named exports:
npm install react-epub-search --save
import React, { useState } from 'react'
import { EpubReader } from 'react-epub-search'
const App = () => {
// And your own state logic to persist state
const [location, setLocation] = useState(null)
const locationChanged = epubcifi => {
// epubcifi is a internal string used by epubjs to point to a location in an epub. It looks like this: epubcfi(/6/6[titlepage]!/4/2/12[pgepubid00003]/3:0)
setLocation(epubcifi)
}
return (
<div style={{ height: '100vh' }}>
<EpubReader
location={location}
locationChanged={locationChanged}
url="https://react-reader.metabits.no/files/alice.epub"
/>
</div>
)
}
export default App
const App = () => {
// And your own state logic to persist state
const [location, setLocation] = useState(null)
const locationChanged = epubcifi => {
setLocation(epubcifi)
}
const onChangeSearchResults = (result) => console.log(results);
return (
<div style={{ height: '100vh' }}>
<EpubReader
location={location}
locationChanged={locationChanged}
onChangeSearchResults={onChangeSearchResults}
url="https://react-reader.metabits.no/files/alice.epub"
/>
</div>
)
}
Other Functionalities:
FAQs
An epub-reader for React integrated with search powered by ePubJS
The npm package react-epub-search receives a total of 1 weekly downloads. As such, react-epub-search popularity was classified as not popular.
We found that react-epub-search demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.