React component and hook to display script-based text output.
npm install --save react-scripted-text
import React from 'react'
import ScriptedText from 'react-scripted-text'
const App = () => {
return (
<div>
<ScriptedText script="text_script.txt" />
{/* or */}
<div>
{ useScriptedText({script_file: "text_script.txt"})}
</div>
</div>
)
}
export default App
// see github example/public/script.txt for an example
// this section will be updated soon
- removed console.logs
- changed ScriptedText property to script (formerly script_file)
- ScriptedText component
- useScriptedText hook
- Available commands: langs, set (lang, delay, speed), *n, wait, clear
MIT © ZJVieth