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

RM-79371 Release over_react 3.8.0 #616

Merged
merged 112 commits into from
Aug 10, 2020
Merged

Conversation

aaronlademann-wf
Copy link
Contributor

@aaronlademann-wf aaronlademann-wf commented Aug 7, 2020

The latest release of over_react includes...

New Features

  • 🎉 🎉 🎉 Support for function components, memo and hooks!!! 🎉 🎉 🎉

    Sooooo much work from so many amazing people made this possible, but to summarize:


    It works like this...

    Define the component

    mixin FancyBorderProps on UiProps {
      String color;
    }
    
    UiFactory<FancyBorderProps> FancyBorder = uiFunction(
      (props) {
        // props is typed as a `FancyBorderProps`
        // whatever you return here will be rendered
        return (Dom.div()..className = 'fancy-border border-${props.color}')( 
          props.children,
        );
      }, 
      // this is the `UiFactoryConfig`
      $FancyBorderConfig, // ignore: undefined_identifier
    );

    Render the component (exact same consumer API as a class-based component):

    import 'package:over_react/over_react.dart';
    import 'fancy_border.dart'; // Where your component is defined
    
    main() {
      final renderedWidget = (FancyBorder()..color = /* some color value */)(
        // put some children here!
      );
    
      react_dom.render(renderedWidget, querySelector('#idOfSomeNodeInTheDom'));
    }

Other Changes

aaronlademann-wf and others added 30 commits January 23, 2020 13:19
# Conflicts:
#	snippets/snippets.json
#	snippets/snippets.xml
Copy link
Contributor

@greglittlefield-wf greglittlefield-wf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 💁‍♂️⭐

joebingham-wk
joebingham-wk previously approved these changes Aug 7, 2020
Copy link
Contributor

@joebingham-wk joebingham-wk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 👏👏👏

@aaronlademann-wf aaronlademann-wf marked this pull request as ready for review August 10, 2020 15:27
@aaronlademann-wf
Copy link
Contributor Author

+1 to cb1ab3c

joebingham-wk
joebingham-wk previously approved these changes Aug 10, 2020
@aaronlademann-wf
Copy link
Contributor Author

@Workiva/release-management-pp

Copy link

@rmconsole-wf rmconsole-wf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 from RM

@rmconsole3-wf rmconsole3-wf merged commit d1904b8 into master Aug 10, 2020
@rmconsole3-wf rmconsole3-wf deleted the function-components-wip branch August 10, 2020 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.