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

Add sample component with state in RNTester #34909

Closed
wants to merge 3 commits into from

Commits on Oct 9, 2022

  1. Generate Custom Native State (facebook#34796)

    Summary:
    Pull Request resolved: facebook#34796
    
    This diff introduces the generation of custom native states using basic types as we do with the Props.
    
    To make it work, the custom types are already writte in the Props.h file, therefore the State.h file must import that other file to have access to the required types.
    
    This diff adds and updates the tests for the State.
    
    ## Changelog
    [General][Added] - Generate custom Native State
    
    Differential Revision: https://internalfb.com/D39816763
    
    fbshipit-source-id: f9ad9811a918d692b6a94766b52a9810549cdcb7
    Riccardo Cipolleschi authored and facebook-github-bot committed Oct 9, 2022
    Configuration menu
    Copy the full SHA
    b8b2aed View commit details
    Browse the repository at this point in the history
  2. Add ImageSource and ImageRequest to generate custom NativeState

    Summary:
    This Diff adds supports on the CustomState generation for ImageSource and ImageRequests, to enable NativeComponents to use the ImageSource loading provided by React Native.
    
    To achieve this, I also had to fox some errors in the imports and to introduce some functions to decorate parameters.
    
    This diff also introduces the tests for thise additional types in both generators and parsers.
    
    ## Changelog
    [General][Added] - add support for ImageSource and ImageRequest in the State.
    
    Differential Revision: https://internalfb.com/D39884889
    
    fbshipit-source-id: c2921db68090ca506642f874b24128015811c7d7
    Riccardo Cipolleschi authored and facebook-github-bot committed Oct 9, 2022
    Configuration menu
    Copy the full SHA
    6b58dc3 View commit details
    Browse the repository at this point in the history
  3. Add sample component with state in RNTester (facebook#34909)

    Summary:
    Pull Request resolved: facebook#34909
    
    This Diff introduces a Sample component in RNTester which uses the NativeState to load some images.
    It is an example on how to use CustomNativeState
    
    In this first diff, I focused on the iOS side of things. The next diff will make this work with Android.
    
    ## Changelog
    [iOS][Added] - Introduce sample component which work with the native state.
    
    Reviewed By: cortinico
    
    Differential Revision: D39884926
    
    fbshipit-source-id: 7e67300e689bac2c155bf84942264e2ef462e6cf
    cipolleschi authored and facebook-github-bot committed Oct 9, 2022
    Configuration menu
    Copy the full SHA
    5803f32 View commit details
    Browse the repository at this point in the history