kibana/examples
Patryk Kopyciński a1d02824f1
[shared-ux-router] Add Router and Routes components (#159834)
## Summary

Why?

To simplify the process of migration to react-router@6.
https://github.com/remix-run/react-router/discussions/8753

What problems exactly it solves?

- In my previous PR I added `CompatRouter`
https://github.com/elastic/kibana/pull/159173, which caused changes in
~50 files and pinged 15 Teams. And this is just meant to be a temporary
change, so when we're done with the migration I would have to revert
these changes and engage everyone to review the PR again. And it is just
a single step in the migration strategy. So to make our lives easier I
think it would be better to have a common place where we do import our
router components because it will allow us to surface some extra logic
in single place instead of going through the whole source code again.

- `react-router@6` doesn't support a custom `Route` component, so that
means our custom `Route` component that we're using almost everywhere
today, will need to be replaced by a different solution. I have decided
to add `Routes` component, which will be responsible for rendering the
proper component (`react-router@6` renamed `Switch` to `Routes`, so I
have named this component to align with the dictionary of the new
router) and also is going to add the logic that today is done in `Route`
(moving logic to `Routes` will be done in the follow-up PR, here I just
wanted to focus on using the common router components to make the review
process easier)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-23 10:02:06 -05:00
..
bfetch_explorer [shared-ux-router] Add Router and Routes components (#159834) 2023-06-23 10:02:06 -05:00
content_management_examples [shared-ux-router] Add Router and Routes components (#159834) 2023-06-23 10:02:06 -05:00
controls_example [Tech Debt] Remove deprecated EuiLoadingContent (#156316) 2023-05-03 08:01:37 -06:00
data_view_field_editor_example [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
developer_examples [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
discover_customization_examples [Discover] Implement Discover customization framework (#158603) 2023-06-14 15:09:13 -03:00
embeddable_examples [Portable Dashboards] Add portable dashboard example plugin (#148997) 2023-02-10 13:21:53 -07:00
embeddable_explorer [shared-ux-router] Add Router and Routes components (#159834) 2023-06-23 10:02:06 -05:00
expressions_explorer [KibanaReact] Use settings service in useUiSetting hook (#154710) 2023-05-12 10:47:56 +03:00
field_formats_example [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
files_example Upgraded EUI to v76.0.0 (#152506) 2023-03-14 14:27:40 -05:00
guided_onboarding_example [shared-ux-router] Add Router and Routes components (#159834) 2023-06-23 10:02:06 -05:00
hello_world [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
locator_examples [shared-ux-router] Add Router and Routes components (#159834) 2023-06-23 10:02:06 -05:00
locator_explorer [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
partial_results_example [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
portable_dashboards_example [shared-ux-router] Add Router and Routes components (#159834) 2023-06-23 10:02:06 -05:00
preboot_example [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
response_stream [shared-ux-router] Add Router and Routes components (#159834) 2023-06-23 10:02:06 -05:00
routing_example Upgraded EUI to v76.0.0 (#152506) 2023-03-14 14:27:40 -05:00
screenshot_mode_example [shared-ux-router] Add Router and Routes components (#159834) 2023-06-23 10:02:06 -05:00
search_examples [shared-ux-router] Add Router and Routes components (#159834) 2023-06-23 10:02:06 -05:00
share_examples [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
state_containers_examples [shared-ux-router] Add Router and Routes components (#159834) 2023-06-23 10:02:06 -05:00
ui_action_examples [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
ui_actions_explorer [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
unified_field_list_examples [UnifiedFieldList] Convert from a plugin into a package (#158718) 2023-06-23 14:28:12 +02:00
user_profile_examples [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
README.asciidoc Add a few asciidoc readmes (#72082) 2020-07-17 11:08:57 -04:00

[[example-plugins]]
== Example plugins

This folder contains example plugins.  To run the plugins in this folder, use the `--run-examples` flag, via

[source,bash]
----
yarn start --run-examples
----