Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I use this with React and JSX? #51

Open
prashcr opened this issue Sep 24, 2016 · 1 comment
Open

How do I use this with React and JSX? #51

prashcr opened this issue Sep 24, 2016 · 1 comment

Comments

@prashcr
Copy link

prashcr commented Sep 24, 2016

const container = document.getElementById("root");

const router = SheetRouter([
    ["/hello", () => <Hello compiler="TypeScript" framework="React" />],
]);

ReactDOM.render(router("/hello"), container);

// I also tried
ReactDOM.render(router("/hello", React.createElement, {}), container);

Both give me the error createTree must be a function

@yoshuawuyts
Copy link
Owner

good question; might be a bug; have you tried it by prepending the { default: '/404 }` thing ? Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants