Skip to content

introduce hooks: e.g. useState (and local installation via npm instead of cdn only version?) #6

@giuliohome

Description

@giuliohome

Does it make sense to push here an enhancement in Main.fs of Bindings to declare a Function Component as defined in this snippet, so that we can have the setState hook natively included in W# React?

Another, minor suggestion: can we make an option to go with either a cdn react or a locally installed one? I'm asking that also to understand how to extend the bindings to other react components, e.g. react-datepicker or react-table, for which I believe we need the npm install.
For example this issue seems to confirm that we can't count on cdn for such a basic and widely used component.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions