piral | Framework for next generation web apps using micro frontends :rocket: | Microservice library
kandi X-RAY | piral Summary
kandi X-RAY | piral Summary
Easily build a next generation portal application using microfrontends. Piral enables you to create a modular frontend application that is extended at runtime with decoupled modules called pilets leveraging a microfrontend architecture. A pilet can be developed independently and ships with the necessary code, as well as all other relevant assets. This makes Piral an ideal foundation for a mid-sized to large-scale applications developed by distributed teams. :zap: A pilet is capable of dynamically extending other pilets or using such extension slots itself. :zap: A pilet is isolated (developed and handled) and will never destroy your application. :zap: A pilet can be developed with any technology using a standard IDE. :zap: A pilet can be updated and published within seconds.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of piral
piral Key Features
piral Examples and Code Snippets
Community Discussions
Trending Discussions on piral
QUESTION
I get this error when debugging my pilet inside the default Piral instance:
...ANSWER
Answered 2021-Jan-22 at 09:15The error is self explanatory, you just need to enclose with Router tags. Try this:
QUESTION
I use piral for our micro-frontend app. I created a layout and use things like
I want to filter the entries in the nav menu by routes. Via convention i'll drop menu items depending on teh current route.
I only have one issue: how can I get access to the current route in the MenuContainer
?
ANSWER
Answered 2020-Jun-27 at 19:02Piral just uses react-router-dom
under the hood. Actually, this gives you access to anything from react-router
and react-router-dom
. As such hooks such as useHistory
work in all components, e.g., your Layout
, MenuContainer
, or in any component of some pilet.
Example:
QUESTION
I was looking into developing a piral-cli extension and had a couple questions about the CliPluginApi
interface:
ANSWER
Answered 2020-Jun-20 at 12:16Yes arguments are positional, however, they may be optional, too.
For anything in this area please check out the documentation of Yargs. This may be helpful.
Still you may use flags with the argv to describe these positionals, e.g.:
QUESTION
We run a few ASP.NET Core applications that do come with some pages. These are all "classic" multipage applications.
For our new portal we've decided to go with piral. While we add a couple of new modules we also want to use the existing applications.
How can we integrate a multipage application in piral or in a clientside (SPA) micro-frontend?
One example for a multipage app looks like (hosted on some address like https://myexample.com/home)
...ANSWER
Answered 2020-Apr-09 at 14:43Migration of an MPA to Piral can be done in multiple ways.
- Create a wrapper pilet that exposes the different SSRed parts via iframes
- Create a wrapper pilet that exposes the different SSRed parts via fragments which are dynamically obtained
- Convert your Razor views into React parts and have a split between FE/BE; put the React parts in a pilet
I don't know how complicated you application is, but maybe (1) would be the easiest to get started (especially if its, e.g., just a single page).
Let's see how (2) may be implemented:
QUESTION
I have an application in production using React 15 which can't be upgraded to the latest React (16) anytime soon.
For the future I want to use piral as a whole, but piral requires React 16 and I don't see how to use React 15 in a pilet.
How can React 15 be used in a pilet / with piral?
What I was thinking so far: I could just follow the path of piral-preact and include a converter. But I have trouble with this approach. Any recommendation or help?
...ANSWER
Answered 2020-Jan-15 at 20:39Generally, you could bundle React 15 / React 15 DOM in a pilet. If multiple pilets are used, you can make React 15 / React 15 DOM a shared dependency. For convenience a converter (e.g., like the one for Inferno) could be created.
Important: To avoid any collisions with the existing react
and react-dom
packages aliases should be used.
In the package.json these aliases can be specified like:
QUESTION
I have already found out how to properly type plugins in piral (by using declaration merging).
This only seems to work for pilet api extensions coming from dedicated packages and also only if there is an api.d.ts in its root folder.
How can I type pilet api extensions that are defined directly in the piral instance?
What I tried so far:
- Placing an api.d.ts in the src folder
- Placing the relevant typings directly in the src/index.tsx file
- Changing the typings field in the package.json to either one (and others like src/types.ts)
ANSWER
Answered 2020-Jan-03 at 13:48Have you tried placing the api.d.ts adjacent to the package.json? That should work!
Besides that the api.d.ts can be as simple as follows:
QUESTION
We are using the microfrontend framework piral. For our pilets we want to provide a custom api. Following the tutorials we came up with code like this
...ANSWER
Answered 2019-Dec-25 at 20:24I think you may be missing the proper declaration merging.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install piral
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page