reactjs / react-art

React Bridge to the ART Drawing Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

render mode is unconfigurable

fumihwh opened this issue · comments

I have read the issue 17 and test source.
#17
https://github.com/reactjs/react-art/blob/master/src/__tests__/ReactART-test.js#L55-L59

And I think there is no way to change the render mode.
In ReactART.js, there is requiring the art/modes/fast, that decide the mode used in ReactART.
@sebmarkbage You said that is already configurable and already do this in the unit test.
Actually L56-L59 in ReactART-test.js do nothing about ReactART Object.

I think you can just delete the L14 in ReactART.js, and let us choose the mode freely.

I agree with @fumihwh. The unit test has access to the dependency's API directly, whereas any application built on top of this doesn't. Mode needs to be exposed in ReactART, along with the available modes (e.g. ReactART.AvailableModes.SVG). And ideally you could change the mode with a component property.

@fumihwh + I'm also looking for a solution.

+1. Would be great if the mode is configureable.

+1 Also looking to have this configurable