Code Prez is an all-in-one solution that aims to revamp coding tutorials, by creating a new dynamic between the student and the content.
It contains two parts, a free and accessible platform for creators to create their documents on, PLUS an NPM package for them to share their amazing tutorials on their own platforms.
This repo is source code of the player.
npm install cdpz-player-beta
- content: Code Prez generated cdpz text file
- audio: CodePrez generated weba audio file
import React, { useEffect, useState } from "react";
import Player from "cdpz-player-beta";
import Axios from "axios"; // Import Axios or use Fetch.
function App() {
const [content, setContent] = useState(null);
useEffect(() => {
const fetchData = async () => {
Axios({path/file}).then((res) => {
setContent(res.data);
});
};
fetchData();
}, []);
return (
<div className="App">
<Player content={content} audio={path/audio}/>
</div>
);
}