Skip to content

What's the idea behind the file names inside Components? #52

Description

@SanderSpies

I'm trying to implement an IOS component inside the Components folder, and noticed the different types of file names:

  • Text.js
  • Image.ios.js
  • SpinnerIOS.ios.js
  • StatusBarIOS.js

What's the idea behind these different names?

Activity

  1. vjeux commented on Feb 8, 2015

    @vjeux
    Contributor

    .ios.js is a file that's only visible in iOS, we also have .android.js.

    This is a way to provide the same module and have a different implementation. Base components such as Image and Text will have the exact same behavior, but call different native implementations, platform specific components such as SpinnerIOS and StatusBarIOS will be a ugly red version, that cannot be used in production but make the app at least run so you can start doing the conversion.

  2. locked as resolved and limited conversation to collaborators on May 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions