lab49 / react-order-book Goto Github PK
View Code? Open in Web Editor NEWRender and style an order book for any asset class. Flexible and customizable.
Home Page: https://5f4988473b6fd20022f12dcc-dowjgxuowh.chromatic.com/
License: MIT License
Render and style an order book for any asset class. Flexible and customizable.
Home Page: https://5f4988473b6fd20022f12dcc-dowjgxuowh.chromatic.com/
License: MIT License
in case this repo is still maintained, I get this error from my frontend:
Warning: OrderBook: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
OrderBook@webpack-internal:///(app-pages-browser)/./node_modules/@lab49/react-order-book/dist/OrderBook.mjs:53:17
ConditionalMarketOrderBook@webpack-internal:///(app-pages-browser)/./components/Markets/ConditionalMarketOrderBook.tsx:14:26
div
See https://github.com/lab49/angular-value-flash for an example of how to do this. Moving all of our automated checks over will help make it easier to manage because everything will be in one place.
Expose functions to help add a price update into the order book. Something like (book: Book, update: BookUpdate) => Book
, but possibly a class to maintain the book prices in a tree for efficient insert and deletes. See bintrees, and the RBTree.
This could also be written as a hook.
Here's a rough example of what this might look like:
import { OrderBook, mergeUpdates } from '@lab49/react-order-book';
const MyComponent = ({ bookData: Book, bookUpdate: BookUpdate }) => {
const book = mergeUpdates(bookData, bookUpdate);
return <OrderBook book={book} />;
}
As of this writing, this is only working in the @next
tag of Storybook. Follow along here: storybookjs/storybook#17831
Here's a good template for a guide like this from the Electron repo: https://github.com/electron/electron/blob/56ab3d73c6f9b2716281b53de3dfcbbbcc1f2188/CONTRIBUTING.md
Right now, you can pick custom colors (bidColor
and askColor
) which will get interpolated over the length of the order book. But, those colors simply get interpolated into white. Instead, we can add props to let users choose a custom end color. This could be quite useful when trying to match the visual design of your order book to an existing application's visual style.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.