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

React addons are not available #4

Closed
jochenberger opened this issue Oct 22, 2015 · 3 comments
Closed

React addons are not available #4

jochenberger opened this issue Oct 22, 2015 · 3 comments

Comments

@jochenberger
Copy link
Contributor

The React addons are not available. I'd prefer having a separate react/addons module but that is not available (facebook/react#5243). On the other hand, the reactcomponent module depends on the react module, so if we just add a react-with-addons module, we'll probably load all the things twice. We could add a symbol to toggle, whether to add the react.js or the react-with-components.js assets as "react" module. The current workaround would be to override the ModuleManager contribution.

@benweidig
Copy link

Also needing this I'm working on a pull request for this.

@jochenberger
Copy link
Contributor Author

Until someone proposes a better solution, the preferred way to do this is now

@ApplicationDefaults
@Contribute(SymbolProvider.class)
public static void overrideReact(final MappedConfiguration<String, Object> configuration) {
  configuration.add(ReactSymbols.REACT_ASSET_PATH, "webjars:react:$version/react-with-addons.js");
}

@jochenberger
Copy link
Contributor Author

From 0.17.1, there is a configuration symbol (de.eddyson.tapestry.react.ReactSymbols.USE_REACT_WITH_ADDONS or tapestry.react.use_react_with_addons) to toggle whether to use the build with or without addons. It defaults to false.

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