Skip to content
This repository was archived by the owner on Nov 18, 2024. It is now read-only.
This repository was archived by the owner on Nov 18, 2024. It is now read-only.

Consider exporting Fbt, FbtParam, FbtPlural #202

Open
@alexandernanberg

Description

@alexandernanberg

🚀 Feature Proposal

Export "empty" Fbt components

Motivation

Allow fbt to work better with TypeScript and friends. With this change types could be added to DefinentlyTyped and would make the setup a lot easier for TypeScript projects.

I think that it would make learning fbt easier in some sense too, using <fbt> and <fbt:param> throws people off when first seeing it.

Also if the babel-plugin was updated to I think we could remove the need for a auto-import option described in #194

Example

Please provide an example for how this feature would be used.

import {Fbt} from 'fbt'

function App() {
  return <Fbt desc="Greeting">Hello world</Fbt>
}

Pitch

I don't see how this could be solved outside of fbt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions