workiva / over_react Goto Github PK
View Code? Open in Web Editor NEWA library for building statically-typed React UI components using Dart.
License: Other
A library for building statically-typed React UI components using Dart.
License: Other
How can we add custom css classes and use it in our overreact application?. I was able to use only default bootstrap classes. Have we got a concept of adding external css files to define our styles?
- Issue Type: BUG
over_react
Version(s):3.1.4
It appears that mapStateToPropsWithOwnProps
is not called (or is called improperly) when passed into the connect
function to create a connected component with OverReact Redux.
To reproduce in the OverReact Redux simple example, follow these steps:
UiFactory<CounterProps> ConnectedMultiplierCounter = connect<CounterState, CounterProps>(
mapStateToPropsWithOwnProps: (state, props) =>
(Counter()..currentCount = state.smallCount * props.multiplier))(Counter);
at the top-level, and add a new prop int multiplier
in _$CounterProps
.
Dom.h2()('ConnectedMultiplierCounter'),
(ConnectedMultiplierCounter()..multiplier = 7)(),
render()
method of components/counter.dart:print('rendering CounterComponent');
print(' multiplier = ${props.multiplier}');
print(' currentCount = ${props.currentCount}');
The following should be printed (in some order) when ConnectedMultiplierCounter
is rendered:
rendering CounterComponent
multiplier = 7
currentCount = null
whereas the expected behavior is to print
rendering CounterComponent
multiplier = 7
currentCount = 7
FYI: @greglittlefield-wf @aaronlademann-wf @kealjones-wk @evanweible-wf @maxwellpeterson-wf
- Issue Type: BUG
over_react
Version(s):1.24.1
After the release of Dart 2 , we tried to migrate our Overreact code with new update . But throwing error like this .
Below is the pubspec.yaml file content:
Can anyone provide a perfect way which would support overreact with Dart 2 .
Nb: We tried running the overreact code with old dart versions , but was asking for latest version of dart .
FYI: @greglittlefield-wf @aaronlademann-wf @jacehensley-wf @clairesarsam-wf @joelleibow-wf
- Issue Type: FEATURE REQUEST
over_react
Version(s):3.1.4
over_react depends on built_redux, which due to versioning issues means I cannot upgrade to built_value version 7.0.0 or later.
Assuming built_redux is not being used in some crucial way (I saw there were some experiments with supporting it in commits from last year, but I don't see any support in the the current documentation), it would be helpful to remove the dependency so that clients can use the latest version of built_value.
The request at the built_redux repo to upgrade the dependency is 3 weeks old, with no reply, so I'm not confident it will be resolved soon.
FYI: @greglittlefield-wf @aaronlademann-wf @kealjones-wk @evanweible-wf @maxwellpeterson-wf
- Issue Type: [FEATURE REQUEST]
over_react
Version(s):^3.1.0
Would be nice if I could use OverReact ^3.1.0 features such as UiComponent2 with Redux.
FYI: @greglittlefield-wf @aaronlademann-wf @kealjones-wk @evanweible-wf @maxwellpeterson-wf
- Issue Type: [BUG, FEATURE REQUEST, etc.]
over_react
Version(s):3.1.7
I expected that since it is legal to return null
from the render()
method of a normal React component, that it would be legal to return null
from the mapStateToProps
function. I realize they have different return types, but it seems the meaning should be the same in each case (i.e., don't render anything).
However, it generates this error:
dart_sdk.js:15575 Uncaught TypeError: Cannot read property 'Symbol(dartx.keys)' of null
at js_backed_map.JsBackedMap.new.addAll (dart_sdk.js:15575)
at js_backed_map.JsBackedMap.new.addAll (js_backed_map.dart:95)
at Function.from (js_backed_map.dart:34)
at Object.jsBackingMapOrJsCopy (js_backed_map.dart:151)
...
The workaround is to render the unconnected version of the component, but pass it a special prop that means "return null
immediately".
But the intent would be communicated more straightforwardly if the mapStateToProps
function could return null
on its own.
FYI: @greglittlefield-wf @aaronlademann-wf @kealjones-wk @evanweible-wf @maxwellpeterson-wf
- Issue Type: BUG
over_react
Version(s):3.5.0
When loading up my web app using the Redux DevTools extension, the console issues the following warning:
OverReactReduxDevToolsMiddleware [WARNING]: Assertion failed: org-dartlang-sdk:///sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/types.dart:87:10
_isJsObject(f) || !JS('bool', '# instanceof #.Function', f, global_)
"Dart function requires `allowInterop` to be passed to JavaScript."
The stack trace reads:
react_devtools_backend.js:6 OverReactReduxDevToolsMiddleware [WARNING]: Assertion failed: org-dartlang-sdk:///sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/types.dart:87:10
_isJsObject(f) || !JS('bool', '# instanceof #.Function', f, global_)
"Dart function requires `allowInterop` to be passed to JavaScript."
r @ react_devtools_backend.js:6
warn @ dart_sdk.js:97415
(anonymous) @ middleware.dart:47
runUnaryGuarded @ dart_sdk.js:31199
[_sendData] @ dart_sdk.js:25426
[_add] @ dart_sdk.js:25374
[_sendData] @ dart_sdk.js:26061
add @ dart_sdk.js:25867
[_publish] @ logger.dart:241
log @ logger.dart:187
warning @ logger.dart:220
middleware._OverReactReduxDevToolsMiddleware.new @ middleware.dart:56
get overReactReduxDevToolsMiddleware @ middleware.dart:187
desc.get @ dart_sdk.js:4908
initialize_model @ app.dart:109
runBody @ dart_sdk.js:31390
_async @ dart_sdk.js:31418
initialize_model @ app.dart:99
start @ app.dart:86
runBody @ dart_sdk.js:31390
_async @ dart_sdk.js:31418
start @ app.dart:80
main$ @ main.dart:4
(anonymous) @ VM733:1
runMain @ client.js:7952
(anonymous) @ client.js:23849
(anonymous) @ client.js:3003
call$2 @ client.js:10800
_asyncStartSync @ client.js:2968
$call$body$main__closure @ client.js:23861
call$1 @ client.js:23792
_rootRunUnary @ client.js:3303
runUnary$2$2 @ client.js:12130
runUnaryGuarded$1$2 @ client.js:12058
_sendData$1 @ client.js:11601
perform$1 @ client.js:11754
call$0 @ client.js:11807
_microtaskLoop @ client.js:3168
_startMicrotaskLoop @ client.js:3174
call$1 @ client.js:10675
invokeClosure @ client.js:1188
(anonymous) @ client.js:1207
childList (async)
call$1 @ client.js:10685
_scheduleAsyncCallback @ client.js:3187
_rootScheduleMicrotask @ client.js:3348
scheduleMicrotask @ client.js:3215
schedule$1 @ client.js:11789
_addPending$1 @ client.js:11592
_sendData$1 @ client.js:11411
add$1 @ client.js:11328
_onIncomingMessage$1 @ client.js:23399
eval @ VM718:3
invokeClosure @ client.js:1188
(anonymous) @ client.js:1207
It might have to do with the breaking change in Dart 2.8.0 described here, relating to allowInterop
FYI: @greglittlefield-wf @aaronlademann-wf @kealjones-wk @evanweible-wf @maxwellpeterson-wf
- Issue Type: FEATURE REQUEST
over_react
Version(s):1.24.1
I need to create an autocomplete component. On clicking and typing on a textbox , autosuggest options should be shown . There are no documentation for it. Can you suggest any way of doing it?
fyi @greglittlefield-wf @aaronlademann-wf @jacehensley-wf @clairesarsam-wf @joelleibow-wf
- Issue Type: BUG,
over_react
Version(s):1.18.1
Hi i ran into this issue while running test for the first time on cloning the git repo . i didnt make any changes . Even then on running the tests as mentioned in documentation , wm getting error like
Unable to spawn isolate: The built-in library 'dart:html' is not available on the stand-alone VM.
'package:todo_dart_react/src/todo_dart_react/components.dart': error: line 5 pos 1: library handler failed
import 'dart:html';
What might be the possible reason?. i tried for some solutions . But not working
Prior to the 2.0.0 release, $Props
and $PropKeys
need to be deprecated so that they can be removed in 2.0.0.
- Issue Type: [FEATURE REQUEST]
Still learning dart and over_react, but is it possible to create wrapper classes that follow the Flutter API syntax where children is set and no call method is required?
I noticed discussion on issue #41, but can't figure out how it would be implemented. It's just personal preference for structuring the code and saving a few parentheses. Thanks.
@montyclt's example:
new Div(
prop: 'Value', //named parameter
children: [
'child1',
'child2'
]
);
as opposed to:
(Dom.div()
..prop = 'Value'
)(
'child1',
'child2'
)
FYI: @greglittlefield-wf @aaronlademann-wf @jacehensley-wf @clairesarsam-wf @joelleibow-wf
- Issue Type: FEATURE REQUEST
over_react
Version(s):3.1.5
I think that the performance of the connect
function in OverReact redux, specifically the performance of the functions it sets up such as handleAreOwnPropsEqual
, handleAreStatePropsEqual
, etc. is adversely affected by potentially unnecessarily equality testing.
I can't set up a simple example to show the effect. It's just something I notice in my complex app with fairly large State
. I'm trying to do very frequent updates (drawing a box created by the user click-dragging), 60 times per second. It can barely render more than once or twice a second when the State is large, even though it is only updating one tiny little object in the State tree representing the dimensions of the box.
I've done the recommended React/Redux optimizations such as setting up connect
on components that would take a while to render, and writing shouldComponentUpdate
on unconnected components. I've profiled with React DevTools and I know that no components are re-rendering that don't need to, so I know it is not unnecessary re-renders making it slow. According to React DevTools, the total render time for everything is very fast (about 1 ms in each round up updating).
The Chrome performance profiler is tough to pick apart, because it points to execution in dart_sdk.js, and who knows which Dart code caused that call.
But the profiler tells me that each round of updates takes at least 100 ms (preventing 60 Hz rendering), and 70% of this time is being spent in _shallowMapEquality
in src\over_react_redux\over_react_redux.dart. I stepped through and found that (a representation of) my entire State tree is being deeply compared for equality using this function every time any Action
is dispatched.
I was very careful to set up an immutable State using built_value and built_collection, only generating a new State (or new part of a subtree of the State) if something changes. I even re-wrote parts of built_value to cache hashCode
so that it is not re-computed unnecessarily. I am also sure that my reducers, when they don't change any data, return the same object, so for such objects an equality comparison should be a one-line call to identical(this, other)
.
But somewhere in the depths of OverReact Redux, I think these carefully constructed objects are being translated into Js-backed Maps, where two different map objects exist that represent the same data, and they need to be deeply compared all the way down to the leaves, just to check that they are equal.
I could be wrong about this, because I don't really understand the architecture of OverReact Redux. But perhaps there is a way to do some optimizations within OverReact Redux so that when data in most of the State tree does not change, the same objects are kept in place so equality testing is a fast call to identical
and does not need to recurse deeply.
Alternately, do you have a suggestion for how to structure my code to prevent such unnecessary equality checking?
FYI: @greglittlefield-wf @aaronlademann-wf @kealjones-wk @evanweible-wf @maxwellpeterson-wf
I have listed my issue in stackoverflow. Please give some suggestions regarding that.
- Issue Type: Documentation
There currently is no working demonstration of the ResizeSensor
component. We should add one!
FYI: @greglittlefield-wf @aaronlademann-wf @jacehensley-wf @clairesarsam-wf @joelleibow-wf
- Issue Type: FEATURE REQUEST
As a consumer, I should be able to easily merge together the classes and blacklists present in two ClassNameBuilders.
ClassNameBuilder a = new ClassNameBuilder()
..add('a')
..add('a-blacklist')
..add('b-blacklist')
..blacklist('a-blacklist');
ClassNameBuilder b = new ClassNameBuilder()
..add('b')
..add('a-blacklist')
..add('b-blacklist')
..blacklist('b-blacklist');
b.merge(a);
b.toClassName(); // 'a b'
b.toClassNameBlacklist() // 'a-blacklist b-blacklist'
This should be done efficiently by directly concatenating _classNamesBuffer
and _blacklistBuffer
, and not using .toClassName()
With key being dynamic and toString
-ing values, it's easy to pass in any object.
It's also easy to pass in objects with non-unique toString
implementations, such as the default Object.toString
, and not notice that the value won't help when keying.
class Foo {
final bar;
Foo(this.bar);
}
..key = new Foo(1) // Uses "Instance of 'Foo'" as key
..key = new Foo(2) // Uses "Instance of 'Foo'" as key
We should check whether values like this are specified (perhaps via a regex, like ^Instance of '[_\$a-zA-Z0-9]+'$
) and warn in the console.
- Issue Type: Feature Request
Requested by CookieOfFortune on Reddit
He would like to be able to use a JSX syntax instead of the over_react
fluent interface.
Here's a link to how TypeScript supports JSX
Seems like this would possibly be something that would require some dartlang sdk changes, but I'd defer to @greglittlefield-wf's opinion on that.
Either way - until we get more than one person asking about it, this is likely icebox.
FYI: @greglittlefield-wf @aaronlademann-wf @jacehensley-wf @clairesarsam-wf @joelleibow-wf
Curious if there is a way to wrapper or make the API a practical drop-in for flutter api?
Hi,
First of all this seem to be like a really great initiative! Great job especially with supporting dart2 now.
My question is there an easy way of using reactstrap components with over_react?
Our formatting guidelines currently recommend against using dartfmt/dart_style on over_react code.
We recently discovered that dartfmt is capable of producing significantly more readable over_react code, due to changes in dart_style that treat Flutter code better when nested components use trailing commas.
For more info, see dart-lang/dart_style#549. Thanks to @skybrian for getting the conversation started, and to @matanlurey for suggesting we revisit the issue!
We should upgrade the formatting guidelines to:
FYI: @greglittlefield-wf @aaronlademann-wf @jacehensley-wf @clairesarsam-wf @joelleibow-wf
- Issue Type: [BUG]
over_react
Version(s):1.2.0
The foreignObject
svg tag doesn't seem to be available in over-react. Typing dom.foreign
doesn't give any completion.
Great lib btw!
FYI: @greglittlefield-wf @aaronlademann-wf @jacehensley-wf @clairesarsam-wf @joelleibow-wf
- Issue Type: [BUG]
over_react
Version(s):3.1.x
When using overReactReduxDevToolsMiddleware, the following warnings are issued in the console:
OverReactReduxDevToolsMiddleware [WARNING]: Unknown type:START
OverReactReduxDevToolsMiddleware [WARNING]: Unknown command: PAUSE_RECORDING. Ignoring
FYI: @greglittlefield-wf @aaronlademann-wf @kealjones-wk @evanweible-wf @maxwellpeterson-wf
- Issue Type: [FEATURE REQUEST, etc.]
over_react
Version(s):2.5.2
I'm asking if is it possible to access the Component specific API after creating builder and element
FYI: @greglittlefield-wf @aaronlademann-wf @kealjones-wk @evanweible-wf @maxwellpeterson-wf
- Issue Type: BUG
We're seeing stacktraces sometimes originating from ResizeSensor:
resize_sensor.dart ResizeSensorComponent._reset
resize_sensor.dart ResizeSensorComponent.componentDidMount.<anonymous function>
resize_sensor.dart _SafeAnimationFrameMixin.requestAnimationFrame.<anonymous function>
message: Uncaught exception: NullError: x is null
One potential cause of this is that _reset
is being called after the component is unmounted, with the unmount taking place during the animation frame delay.
We should add a _isMounted
check inside _reset
to hopefully fix this.
- Issue Type: FEATURE REQUEST
We should make OverReact strong-mode compliant. With all the new DDC stuff coming out including the Dart Console, it would be really nice to let our consumers use those new tools.
FYI: @greglittlefield-wf @aaronlademann-wf @clairesarsam-wf @joelleibow-wf
- Issue Type: [STYLE]
over_react
Version(s):3.1.x
The declaration of render without a return type always gives me the dart(always_declare_return_types) error.
Should a type be added to be consistent with the style guide?
FYI: @greglittlefield-wf @aaronlademann-wf @kealjones-wk @evanweible-wf @maxwellpeterson-wf
This project looks great, but I don't see anywhere to communicate with OverReact users.
Anything?
- Issue Type: [BUG]
over_react
Version(s):2.5.2
The SVG text element should have textLength
as an available field (documented here: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/textLength), but it does not.
The following should work but fails to compile:
ReactElement text_elt = (Dom.text()..textLength='50')('hello');
The workaround is to assigned the property by a String
key in the intermediate object of type SvgProps
:
SvgProps text_props = Dom.text();
text_props.addProp('textLength', '50');
ReactElement text_elt = text_props('hello');
FYI: @greglittlefield-wf @aaronlademann-wf @kealjones-wk @evanweible-wf @maxwellpeterson-wf
To ease the transition, automatic code migration tools should be provided for:
Or,
..if you need to transition multiple packages/codebases without breaking changes.
$Props
and $PropKeys
will not work in Dart 2 and will need to be removed. The alternative API is via static PropsMeta meta
getters on props classes.
Travis is slow enough that the loading of our JS unit test suites times out the test package. See dart-lang/test/issues/390
For now, we can run the tests on our private CI, but it would be great to have those results available publicly.
As an alternative solution, we could also run them on Sauce Labs.
- Issue Type: Query
over_react
Version(s):1.24.1
I need to display a component on a certain condition . The display of component should be done through a sliding effect . Where to write animation so that it works when component is shown on screen .
I tried using main() , constructor()
and componentDidMount() .
None of the above items are called on load . Can you please suggest ?
FYI: @greglittlefield-wf @aaronlademann-wf @jacehensley-wf @clairesarsam-wf @joelleibow-wf
- Issue Type: BUG
over_react
Version(s):3.1.4
I'm sorry, I'm not quite sure who is "responsible" for this, so it may not be this package, but some combination of built_collection, over_react, and redux.dart is not working for me. The author of built_collection thinks the issue is in the over_react package.
The general case occurs when using over_react, redux.dart, built_collection, and built_value, with a redux state that is a built_value tree composed of other built_value objects recursively, as well as built_collection collections such as BuiltList
.
Here's a self-contained example where the whole state is a single BuiltList
:
var state = BuiltList<int>([2, 5]);
var store = DevToolsStore<BuiltList<int>>((s, _) => s, initialState: state, middleware: [overReactReduxDevToolsMiddleware]);
This produces the warning
OverReactReduxDevToolsMiddleware [WARNING]: You must implement a toJson
method in your state and actions in order to view state changes in the redux dev tools.
The warning is accurate; Redux DevTools is not able to display the state in the Chrome plugin and instead displays
(pin): "Could not encode state. Ensure state is json encodable"
I tried adding the following code to enable BuiltList
to have a toJson
method, but the issue remains.
extension BuiltListSerializable<E> on BuiltList<E> {
dynamic toJson() => this.toList();
}
The error does not occur with built_value objects, because I define those myself (unlike BuiltList
, BuiltMap
, BuiltSet
) and can add a toJson
method to them. To do this I define a mixin as follows:
@SerializersFor([
// big list of all my built_value classes
])
Serializers serializers = _$serializers;
Serializers standard_serializers = (serializers.toBuilder()..addPlugin(new StandardJsonPlugin())).build();
mixin BuiltJsonSerializable {
dynamic toJson() => standard_serializers.serialize(this);
}
FYI: @greglittlefield-wf @aaronlademann-wf @kealjones-wk @evanweible-wf @maxwellpeterson-wf
Could give more examples.
I hope could see following examples:
I have no ideal how to use over_react in real world.
I'm sorry for my bad English.
Dart 1.22 recently added support for covariant overrides, which allows for sound tightening of method argument types.
This applies to fields/setters as well.
Currently, you cannot tighten the type of a prop in strong mode.
class FooProps {
Iterable items;
}
class BarProps extends FooProps {
@override
List items; // Error: Field declaration FooProps.items cannot be overridden in BarProps.
}
However, with covariant
, that should now be possible:
class FooProps {
covariant Iterable items;
}
class BarProps extends FooProps {
@override
List items;
}
The transformer needs to be updated to generate setters with the covariant
keyword when necessary.
-covariant Iterable items;
+Iterable get items => props[...];
+set items(covariant Iterable value) => props[...] = value;
Also worth noting:
In cases where the supertype authors did not foresee this need, it is still possible to tighten a parameter type by putting the covariant modifier on the overriding parameter declaration.
- Issue Type: BUG
over_react
Version(s):1.8.0
The newly-added transition warning,
VALIDATION WARNING: The number of transitions expected to complete have not completed. Something is most likely wrong.
fires when shouldn't sometimes.
For instance, sometimes transitionend events never fire on purpose, such as when the user cancels the transition (think hiding a popover while it's still showing). This results in a warning when it should not.
I also noticed in the code that the timer does not unsubscribe the listener function, which it probably should.
FYI: @greglittlefield-wf @aaronlademann-wf @jacehensley-wf @clairesarsam-wf @joelleibow-wf @kaanaksoy-wk
- Issue Type: FEATURE REQUEST
over_react
Version(s):3.1.4
When using overReactReduxDevToolsMiddleware
with DevToolsStore
, if some part of the state, or one of the actions, is not encodable by toJson
, the following generic warning is issued:
dart_sdk.js:101547 OverReactReduxDevToolsMiddleware [WARNING]: You must implement a toJson
method in your state and actions in order to view state changes in the redux dev tools.
This can be very difficult to track down in a large state tree.
It would be better for the error message to point to the specific object that was not encodable. I have spent a lot of time trying to track it down in various parts of my state tree and actions, when I thought I had implemented toJson
properly.
In fact, immediately before I call the constructor for DevToolsStore
, I create my state object and call toJson()
on it, and it works perfectly, yet I get that warning while the constructor is executing in the next step.
FYI: @greglittlefield-wf @aaronlademann-wf @kealjones-wk @evanweible-wf @maxwellpeterson-wf
- Issue Type: BUG
over_react
Version(s):1.29.0
- SDK:
1.24.3
Warning: Accessing createClass via the main React package is deprecated, and will be removed in React v16.0. Use a plain JavaScript class instead. If you're not yet ready to migrate, create-react-class v15.* is available on npm as a temporary, drop-in replacement. For more info see https://fb.me/react-create-class
It seems that react-dart for Dart 2.1.0 doesn't have this issue. But I dropped back to 1.24.3 for many good plugins. Thanks for your hard work.
- Issue Type: [BUG?, DOCUMENTATION]
over_react
Version(s):1.23.0
I want to get started with over_react but following the instruction on the readme lead to an error I cannot solve as a Dart beginners.
Here the steps I follow
pub get
This is the error I have :
react_interop.dart:32 Uncaught ReferenceError: render is not defined
at StaticClosure.dart.ReactDom_render (react_interop.dart:32)
at StaticClosure.dart.main (main.dart:56)
at _IsolateContext.eval$1 (isolate_helper.dart:475)
at Object.startRootIsolate (isolate_helper.dart:130)
I though it could be that I have to manual add the dependencies. But still no luck.
Here is a repo of the code I have after these steps https://github.com/francisl/test_over_react
FYI: @greglittlefield-wf @aaronlademann-wf @jacehensley-wf @clairesarsam-wf @joelleibow-wf
- Issue Type: [DOC REQUEST]
over_react
Version(s):^3.0.0
Stagehand templates come with build_web_compilers, which conflicts with over_react. This is a big gotcha for beginners and it would be nice if there was a warning in the docs about this. The fix is to change the version of build_web_compilers to ^2.0.0
FYI: @greglittlefield-wf @aaronlademann-wf @kealjones-wk @evanweible-wf @maxwellpeterson-wf
The following code
typedef Callback1Arg<T1>(T1 arg1);
/// Generic strongly-typed callback chaining utilities for callbacks with one argument.
class CallbackUtil1Arg<T> extends CallbackUtil<Callback1Arg<T>> {
}
abstract class CallbackUtil<TTypedef extends Function> {
const CallbackUtil();
}
now fails with
'T' can't be used contravariantly or invariantly in 'CallbackUtil<dynamic Function(T)>'.
Try not using class type parameters in types of formal parameters of function types.dart(wrong_type_parameter_variance_in_superinterface)
Since This feature landed
- Issue Type: Suggestion
over_react
Version(s):1.29.0
React.js tutorial in Dart version is here -- https://github.com/patarapolw/SimpleDart2Js#overreact-for-dart-1
I create both for React-Dart and OverReact.
I do this because I just don't want to use JavaScript/TypeScript and NPM/Yarn directly.
I dont see an event store here.
There are 2 or 3 in dart we can use.
also immutable types will be needed i feel.
https://github.com/jonahwilliams/immutable-dart
- DOCUMENTATION_REQUEST
over_react
Version(s):any
I'm trying to bridge an existing React component library (https://blueprintjs.com/) and it would be great if you can point me to docs on the cleanest way do that.
For a simple example like https://blueprintjs.com/docs/#core/components/text
@Factory()
UiFactory<TextProps> Text;
@Props()
class TextProps extends UiProps {
String className;
String ellipsize;
String tagName;
}
@Component()
class TextComponent extends UiComponent<TextProps> {
// Assuming the JS for the component library has already been loaded, what would go here?
}
If you can fill in the example or let me know if there an bridged examples in the codebase already I can take it from there.
FYI: @greglittlefield-wf @aaronlademann-wf @jacehensley-wf @clairesarsam-wf @joelleibow-wf
A builder with the same functionality that replaces the Dart 1 transformer.
- Issue Type: [FEATURE REQUEST]
over_react
Version(s):^3.1.0
For implementing functions such as componentDidUpdate
and getSnapshotBeforeUpdate
and any function that has the parameter prevProps
, is there a way to generate getters similar to how getters are generated for UiProps
? Currently, my approach to working with prevProps
is as follows. Supposed I have a prop:
@Props()
class _$AppProps extends UiProps with ConnectPropsMixin {
String field;
}
Now suppose I try to implement componentDidUpdate
and I want to compare the previous prop's field to the current prop's field:
@override
void componentDidUpdate(Map prevProps, Map prevState, [snapshot]) {
if (props.field != prevProps['AppProps.field']) {
// -- snip --
}
}
I am forced to use a string literal for the prevProps
map. Is there a better way to do this? Using these string fields was exactly the kind of problem that OverReact was designed to avoid no?
FYI: @greglittlefield-wf @aaronlademann-wf @kealjones-wk @evanweible-wf @maxwellpeterson-wf
BUG
Website: https://workiva.github.io/over_react/
API documentation button leads to a broken link on your website.
--> https://pub.dev/documentation/over_react/latest/index.html
FYI: @greglittlefield-wf @aaronlademann-wf @kealjones-wk @evanweible-wf @maxwellpeterson-wf
Utilizing existing React JS component is possible via react-dart, but the setup isn't well-documented.
The experience could also be improved by consuming those components with statically-defined over_react props.
- Issue Type: Question
over_react
Version(s):1.24.1
How can we use time out function inside overreact on load of a component?
Tried javascript and jquery functions . But they were not compatible with Overeact . Can you please give a sample where an action is performed on page load with a timeout ?
FYI: @greglittlefield-wf @aaronlademann-wf @kealjones-wk @evanweible-wf @maxwellpeterson-w
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.