Skip to content

How to use recharts without a build system? #5271

Answered by Kreijstal
Kreijstal asked this question in Q&A
Discussion options

You must be logged in to vote

I apologize for my harsh tone earlier - that wasn't constructive.

While Recharts is indeed a React library, it's important to note that JSX is not a requirement for using React - it's just syntactic sugar that gets transformed into JavaScript. React can be used with plain JavaScript calls to React.createElement() or similar factory functions.

I've created a working example demonstrating Recharts usage without JSX here: https://observablehq.com/@kreijstal/rechart-without-build-system

For those unfamiliar, esm.sh is a CDN that provides ESM versions of npm packages, allowing direct usage in browsers without a build system. This can be particularly useful for prototyping or environments where…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Kreijstal
Comment options

@Kreijstal
Comment options

Answer selected by Kreijstal
@Kreijstal
Comment options

@ckifer
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants