Skip to content
simple music player component with useContext
OCaml JavaScript HTML C++
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Contributors Issues MIT License


Reason Music Player

A simple music player built with ReasonReact and useContext
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

About The Project

A ReasonReact music player with the React Context API

View Demo

This is a port of James King's blog post How to Use the useContext Hook in React to ReasonReact.

With this repository you can see my progress in converting a React.js example to ReasonML and ReasonReact.

It also serves as a code example for a tutorial series. If you want to follow along, you can read the blog posts on

Built With

Getting Started

To get a local copy up and running follow these steps:


Before using reason-music-player you need:

Install Bucklescript and Reason:

npm install -g bs-platform --unsafe-perm

(I use pnpm for installing local packages, that's why you'll find a pnpm-lock.yml file in this repository.)

For editor support, check the Reason Docs. For Vim, you can check my blog post about ReasonML Development With Vim.


  1. Clone the repo
git clone

(Alternatively, use degit: npx degit sophiabrandt/reason-music-player reason-music-player).

  1. Install NPM packages
cd reason-music-player && npm install


Run the project locally under http://localhost:3000 via:

npm run start

Create a production build:

npm run build


See the open issues for a list of proposed features (and known issues).


Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request


Distributed under the MIT License. See LICENSE for more information.


Sophia Brandt - @hisophiabrandt

Project Link:


You can’t perform that action at this time.